Home | History | Annotate | only in /src/sys/arch/hppa
History log of /src/sys/arch/hppa
RevisionDateAuthorComments
 1.2 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.150; 1.1.160; 1.1.166;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.166.1 18-May-2014  rmind sync with head
 1.1.160.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.150.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.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file Makefile was added on branch gehenna-devsw on 2002-07-14 17:47:05 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:37:03 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:49 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.49 27-Mar-2025  riastradh virtio(4): Consolidate kernel configs.

No functional change intended.

Leave `# XXX ?' comments where I don't know why the driver in
question is excluded. (Typical reason is that PAGE_SIZE is not 4096
but I didn't investigate -- if you do investigate, please either
update the comment if you determine a reason, or enable the driver if
you don't.)

PR kern/59211: vio9p(4): missing from various GENERICs and MAKEDEVs
 1.48 10-Feb-2025  tsutsui Add virtio(4) devices and ld(4) node for qemu.

Ok'ed by skrll@. Tested on qemu 9.1.2.
 1.47 01-Dec-2024  jakllsch fix comment syntax
 1.46 29-Nov-2024  macallan dd summitfb
 1.45 17-Jul-2024  macallan add hyperfb at uturn
This is a native driver for HCRX cards, with full wscons support
( as in, virtual consoles, fonts, colours, X with hw cursor )
needs testing on anything that isn't a GSC HCRS24Z
 1.44 14-Mar-2024  macallan branches: 1.44.2;
add gftfb
 1.43 29-Jan-2024  christos PR/57889: Ricardo Branco: ext2fs does not have user immutable and append
file flags, only system ones. Restrict those to the superuser. Before
the behavior was controlled by EXT2FS_SYSTEM_FLAGS. Make that behavior the
default.
 1.42 12-Feb-2023  abs Add optoion GENERIC.local include to the end of ~all GENERIC configs

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

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

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

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

PR kern/29702
 1.40 07-Aug-2022  simonb UFS/LFS dirhash:
- Enable UFS_DIRHASH if the architecture or kernel model specific config
file can use 128MB of RAM or more.
- Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
and by a number of NetBSD developers for years.
- Add LFS_DIRHASH if LFS was enabled.
- Be somewhat consistent with FS options order.
 1.39 15-May-2022  skrll Sprinkle some <space><tab> consistency
 1.38 29-Jun-2021  nia Remove uscanner(4) driver

This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
 1.37 21-Jan-2021  nia branches: 1.37.4;
add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.36 27-Sep-2020  roy branches: 1.36.2;
vether: Add to kernel configurations

It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
 1.35 01-Aug-2020  maxv Remove references to BRIDGE_IPF, it is now compiled in by default.
 1.34 16-May-2020  maya Remove uyap, USB YAP phone firmware loader.

And the associated ezload EZ-USB code, which is only used by uyap.
It could theoretically be used by other drivers, but none of them are
in tree.

I suspect that this device isn't in use, as phone technology has improved
a lot since 2001 when uyap(4) was added to the tree.

Proposed with no objections on netbsd-users on 13 April 2020
 1.33 11-May-2020  skrll Enable modules
 1.32 29-Jan-2020  maya remove urio(4), a driver for the Rio500 MP3 player.

At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.
 1.31 25-Jan-2020  thorpej Retire "le* at pci?" from the shipped kernel configs:
- If the config had both an le@pci and a pcn, simply remove le@pci
(pcn would match at a higher priority anyway).
- If the config had le@pci enabled, but no pcn, change le@pci to pcn.
- If the config had le@pci commented out, but no pcn, change le@pci
to pcn and leave it commented out.

The pcn driver supports more chips than le@pci and does DMA directly
to/from mbufs rather than memory copies.
 1.30 20-Jan-2020  thorpej Remove FDDI support.
 1.29 19-Jan-2020  thorpej Remove HIPPI support and the esh(4) driver that uses it. There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.
 1.28 19-Jan-2020  thorpej Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
 1.27 26-Apr-2019  sevan branches: 1.27.4;
Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
 1.26 15-Apr-2019  skrll Trailing whitespace
 1.25 23-Mar-2019  maxv Remove references to COMPAT_OSF1 in HPPA, it has never been supported on
this architecture.
 1.24 06-Feb-2019  rin Add ure(4) to kernel config files. Also add PHY drivers where necessary.
 1.23 12-Dec-2018  maxv Remove references to "lmc" in the kernel configurations.
 1.22 23-Oct-2018  jdolecek remove the 'wd* at umass?' for the non-standardized and rare (extinct?)
In-System Design ATA protocol over Bulk-Only devices from most kernels,
leave only in i386/amd64 ALL; it's unmaintained and likely currently broken,
lack of test hardware makes it impossible to support
 1.21 06-Sep-2018  maxv Retire the 'midway' driver. Discussed on tech-net@ recently and also three
years ago, part of removing the network ATM code.
 1.20 25-Aug-2018  rin Add (commented out) mue(4) to where appropriate.
Also add MII/PHY drivers for USB NICs if missing.
 1.19 01-Aug-2018  maxv Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
 1.18 08-Feb-2018  dholland branches: 1.18.2; 1.18.4;
Typos.
 1.17 23-Jan-2018  sevan Alternate buffer queue strategies no longer considered experimental, update
description.

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

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

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

ok riastradh
 1.13 29-Jul-2017  maxv Remove TCP_COMPAT_42 from the config files. Pass 3.
 1.12 24-May-2017  christos branches: 1.12.2;
rename u3ginit driver to umodeswitch
 1.11 13-Dec-2016  christos wildcard speaker attachments, now that we can handle many of them.
 1.10 10-Dec-2016  christos remove VAUDIOSPEAKER for now, will be done differently.
 1.9 08-Dec-2016  nat Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
 1.8 19-Mar-2016  gdt branches: 1.8.2;
Disable uscanner in all kernel configs

As discussed on current-users@, SANE uses ugen via libusb and not
uscanner, so users are not well served by having uscanner. Consensus
is that addressing how to adjust permissions for scanners should not
block restoring basic functionionality.

(Compile-tested only, but there are multiple reports of this being the
right approach.)
 1.7 26-Sep-2015  maxv Remove KMEMSTATS. Normally it's ok now.
 1.6 16-Nov-2014  manu branches: 1.6.2;
Remove unused extended attributes kernel options

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

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

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

There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
 1.2 16-Aug-2014  apb branches: 1.2.2;
Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.8;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.8.2 18-Nov-2014  snj Pull up following revision(s) (requested by manu in ticket #251):
sys/arch/acorn26/conf/GENERIC: revision 1.81
sys/arch/acorn32/conf/GENERIC: revision 1.116
sys/arch/alpha/conf/GENERIC: revision 1.362
sys/arch/amd64/conf/ALL: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.404
sys/arch/amd64/conf/XEN3_DOM0: revision 1.112
sys/arch/amd64/conf/XEN3_DOMU: revision 1.60
sys/arch/amiga/conf/GENERIC.in: revision 1.129
sys/arch/amiga/conf/GENERIC: revision 1.311
sys/arch/amigappc/conf/GENERIC: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.184
sys/arch/bebox/conf/GENERIC: revision 1.145
sys/arch/cats/conf/GENERIC: revision 1.155
sys/arch/cesfic/conf/GENERIC: revision 1.65
sys/arch/cobalt/conf/GENERIC: revision 1.147
sys/arch/dreamcast/conf/GENERIC: revision 1.121
sys/arch/emips/conf/GENERIC: revision 1.15
sys/arch/epoc32/conf/GENERIC: revision 1.8
sys/arch/ews4800mips/conf/GENERIC: revision 1.51
sys/arch/hp300/conf/GENERIC: revision 1.190
sys/arch/hpcmips/conf/GENERIC: revision 1.229
sys/arch/hpcsh/conf/GENERIC: revision 1.106
sys/arch/hppa/conf/GENERIC: revision 1.6
sys/arch/i386/conf/ALL: revision 1.389
sys/arch/i386/conf/GENERIC: revision 1.1118
sys/arch/i386/conf/XEN3_DOM0: revision 1.93
sys/arch/i386/conf/XEN3_DOMU: revision 1.65
sys/arch/ibmnws/conf/GENERIC: revision 1.46
sys/arch/iyonix/conf/GENERIC: revision 1.88
sys/arch/landisk/conf/GENERIC: revision 1.45
sys/arch/luna68k/conf/GENERIC: revision 1.119
sys/arch/mac68k/conf/GENERIC: revision 1.220
sys/arch/macppc/conf/GENERIC: revision 1.320
sys/arch/macppc/conf/MAMBO: revision 1.24
sys/arch/macppc/conf/POWERMAC_G5: revision 1.25
sys/arch/mipsco/conf/GENERIC: revision 1.88
sys/arch/mmeye/conf/GENERIC: revision 1.120
sys/arch/mvme68k/conf/GENERIC: revision 1.94
sys/arch/mvmeppc/conf/GENERIC: revision 1.24
sys/arch/netwinder/conf/GENERIC: revision 1.126
sys/arch/news68k/conf/GENERIC: revision 1.125
sys/arch/newsmips/conf/GENERIC: revision 1.129
sys/arch/next68k/conf/GENERIC: revision 1.139
sys/arch/ofppc/conf/GENERIC: revision 1.157
sys/arch/pmax/conf/GENERIC64: revision 1.21
sys/arch/pmax/conf/GENERIC: revision 1.185
sys/arch/prep/conf/GENERIC: revision 1.174
sys/arch/rs6000/conf/GENERIC: revision 1.33
sys/arch/sandpoint/conf/GENERIC: revision 1.88
sys/arch/sbmips/conf/GENERIC: revision 1.101
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.28
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.104
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.106
sys/arch/shark/conf/GENERIC: revision 1.121
sys/arch/sparc/conf/GENERIC: revision 1.248
sys/arch/sparc/conf/TADPOLE3GX: revision 1.65
sys/arch/sparc64/conf/GENERIC: revision 1.177
sys/arch/sparc64/conf/NONPLUS64: revision 1.44
sys/arch/sun2/conf/GENERIC: revision 1.94
sys/arch/sun3/conf/GENERIC: revision 1.171
sys/arch/vax/conf/GENERIC: revision 1.193
sys/arch/vax/conf/VAX780: revision 1.19
sys/arch/x68k/conf/GENERIC: revision 1.179
sys/arch/zaurus/conf/GENERIC: revision 1.65
sys/ufs/files.ufs: revision 1.38
Remove unused extended attributes kernel options

As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
 1.1.8.1 14-Nov-2014  martin Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
sys/arch/amiga/conf/GENERIC: revision 1.310
sys/arch/pmax/conf/GENERIC64: revision 1.20
sys/arch/macppc/conf/MAMBO: revision 1.23
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.27
sys/arch/amigappc/conf/GENERIC: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.403
sys/arch/ofppc/conf/GENERIC: revision 1.156
sys/arch/mac68k/conf/GENERIC: revision 1.219
sys/arch/i386/conf/XEN3_DOMU: revision 1.64
sys/arch/mipsco/conf/GENERIC: revision 1.87
sys/arch/hp300/conf/GENERIC: revision 1.189
sys/arch/vax/conf/GENERIC: revision 1.192
sys/arch/news68k/conf/GENERIC: revision 1.124
sys/arch/ibmnws/conf/GENERIC: revision 1.45
sys/arch/hpcsh/conf/GENERIC: revision 1.105
sys/arch/sparc/conf/TADPOLE3GX: revision 1.64
sys/arch/i386/conf/XEN3_DOM0: revision 1.92
sys/arch/sparc/conf/GENERIC: revision 1.247
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.105
sys/arch/prep/conf/GENERIC: revision 1.173
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.103
sys/arch/rs6000/conf/GENERIC: revision 1.32
sys/arch/hpcmips/conf/GENERIC: revision 1.228
Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr
Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file GENERIC was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file GENERIC was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.2.3 03-Dec-2017  jdolecek update from HEAD
 1.2.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.1 16-Aug-2014  tls file GENERIC was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.6.2.4 28-Aug-2017  skrll Sync with HEAD
 1.6.2.3 05-Feb-2017  skrll Sync with HEAD
 1.6.2.2 22-Apr-2016  skrll Sync with HEAD
 1.6.2.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.8.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.12.2.1 26-Jan-2018  martin Pull up following revision(s) (requested by sevan in ticket #510):
sys/arch/sun3/conf/GENERIC3X: revision 1.130
sys/arch/sparc64/conf/GENERIC: revision 1.203
sys/arch/news68k/conf/LIBERO: revision 1.66
sys/arch/amiga/conf/DRACO: revision 1.185
sys/arch/evbarm/conf/MV2120: revision 1.35
sys/arch/x68k/conf/GENERIC: revision 1.187
sys/arch/rs6000/conf/GENERIC: revision 1.39
sys/arch/news68k/conf/GENERIC_TINY: revision 1.86
sys/arch/i386/conf/XEN3_DOMU: revision 1.88
sys/arch/iyonix/conf/GENERIC: revision 1.97
sys/arch/evbarm64/conf/A64EMUL: revision 1.11
sys/arch/mvme68k/conf/GENERIC: revision 1.98
sys/arch/acorn32/conf/GENERIC: revision 1.124
sys/arch/i386/conf/XEN3_DOM0: revision 1.125
sys/arch/cobalt/conf/INSTALL: revision 1.65
sys/arch/macppc/conf/GENERIC_601: revision 1.16
sys/arch/hppa/conf/GENERIC: revision 1.17
sys/arch/amiga/conf/GENERIC.in: revision 1.137
sys/arch/sgimips/conf/GENERIC32_IP12: revision 1.33
sys/arch/netwinder/conf/GENERIC: revision 1.134
sys/arch/amd64/conf/XEN3_DOMU: revision 1.83
sys/arch/mac68k/conf/GENERIC: revision 1.225
sys/arch/arc/conf/RPC44: revision 1.54
sys/arch/mipsco/conf/GENERIC: revision 1.92
sys/arch/cats/conf/GENERIC: revision 1.166
sys/arch/amd64/conf/XEN3_DOM0: revision 1.145
sys/arch/amigappc/conf/GENERIC: revision 1.33
sys/arch/sun3/conf/GENERIC: revision 1.176
sys/arch/news68k/conf/GENERIC: revision 1.130
sys/arch/hpcsh/conf/GENERIC: revision 1.110
sys/arch/hp300/conf/GENERIC: revision 1.198
sys/arch/atari/conf/GENERIC.in: revision 1.115
sys/arch/sparc/conf/MRCOFFEE: revision 1.54
sys/arch/evbppc/conf/EXPLORA451: revision 1.62
sys/arch/cesfic/conf/GENERIC: revision 1.69
sys/arch/vax/conf/GENERIC: revision 1.204
sys/arch/sgimips/conf/GENERIC32_IP3x: revision 1.115
sys/arch/sgimips/conf/GENERIC32_IP2x: revision 1.112
sys/arch/sparc/conf/GENERIC: revision 1.258
sys/arch/next68k/conf/GENERIC: revision 1.145
sys/arch/evbarm/conf/MMNET_GENERIC: revision 1.34
sys/arch/prep/conf/GENERIC: revision 1.185
sys/arch/amiga/conf/INSTALL: revision 1.129
sys/arch/newsmips/conf/GENERIC: revision 1.133
sys/arch/cobalt/conf/GENERIC: revision 1.156
sys/arch/sun2/conf/GENERIC: revision 1.99
sys/arch/luna68k/conf/INSTALL: revision 1.25
sys/arch/amigappc/conf/NULL: revision 1.53
sys/arch/acorn26/conf/GENERIC: revision 1.85
sys/arch/vax/conf/VAX780: revision 1.25
sys/arch/luna68k/conf/GENERIC: revision 1.125
sys/arch/ews4800mips/conf/GENERIC: revision 1.56
sys/arch/macppc/conf/POWERMAC_G5: revision 1.29
sys/arch/arc/conf/GENERIC: revision 1.189
sys/arch/macppc/conf/MAMBO: revision 1.27
sys/arch/acorn32/conf/EB7500ATX: revision 1.64
sys/arch/pmax/conf/GENERIC: revision 1.196
sys/arch/pmax/conf/GENERIC64: revision 1.28
sys/arch/amiga/conf/GENERIC: revision 1.319
sys/arch/evbarm/conf/MPCSA_GENERIC: revision 1.55
sys/arch/macppc/conf/GENERIC: revision 1.339
sys/arch/emips/conf/GENERIC: revision 1.21
sys/arch/sandpoint/conf/GENERIC: revision 1.97
sys/arch/landisk/conf/GENERIC: revision 1.58
sys/arch/bebox/conf/GENERIC: revision 1.157
sys/arch/alpha/conf/GENERIC: revision 1.379
Alternate buffer queue strategies no longer considered experimental, update
description.
Discussed on tech-kern
http://mail-index.netbsd.org/tech-kern/2018/01/21/msg023002.html
 1.18.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.18.4.1 10-Jun-2019  christos Sync with HEAD
 1.18.2.4 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.18.2.3 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.18.2.2 30-Sep-2018  pgoyette Ssync with HEAD
 1.18.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.27.4.2 29-Feb-2020  ad Sync with head.
 1.27.4.1 25-Jan-2020  ad Sync with head.
 1.36.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.37.4.1 01-Aug-2021  thorpej Sync with HEAD.
 1.44.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file GENERIC.MP was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file GENERIC.MP was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file GENERIC.MP was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.9 08-Aug-2023  mrg introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

CC_WNO_MISSING_TEMPLATE_KEYWORD
CC_WNO_REGISTER
CC_WNO_STRINGOP_OVERREAD
CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings. of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
 1.8 14-Sep-2020  skrll (Re)Enable -Werror=array-bounds.
 1.7 07-Sep-2020  mrg enable -Wno-error=array-bounds for GCC 9 and hppa. machdep.c has a
bunch of warnings that i can't workaround yet.
 1.6 22-Sep-2018  rin - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

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

OK christos
 1.5 06-Sep-2015  uebayasi branches: 1.5.16; 1.5.18;
spmath.o is an MD library, not an MD object.
 1.4 24-Aug-2015  uebayasi Define ${LINKSCRIPT} in one place.
 1.3 20-Aug-2015  uebayasi Use ${KERNLDSCRIPT}.
 1.2 15-Nov-2014  uebayasi branches: 1.2.2;
Use LINKSCRIPT.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile.hppa was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile.hppa was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile.hppa was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.2.1 22-Sep-2015  skrll Sync with HEAD
 1.5.18.1 10-Jun-2019  christos Sync with HEAD
 1.5.16.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.4 13-Jan-2022  skrll bump
 1.3 04-Nov-2019  christos bump for gcc8
 1.2 02-Mar-2014  skrll branches: 1.2.4; 1.2.6; 1.2.10; 1.2.36;
Bump MEMORY_DISK_ROOT_SIZE
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 02-Mar-2014  tls file RAMDISK was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 02-Mar-2014  yamt file RAMDISK was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 02-Mar-2014  rmind file RAMDISK was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.29 20-Oct-2025  macallan defflag STI_PCI_DEBUG
 1.28 19-Nov-2024  riastradh files.hppa: Nix trailing whitespace.

No functional change intended.
 1.27 19-Nov-2024  macallan add summitfb
 1.26 12-Jul-2024  macallan first shot at a native driver for HCRX cards
this will give you a fully working wsdisplay in 8bit colour living in the
overlay planes, X/wsfb will also work.
No acceleration or cursor sprite support yet.
 1.25 13-Feb-2024  macallan branches: 1.25.2;
crude beginning of a native driver for PCI Visualize EG cards
so far it supports:
- colour
- virtual consoles
todo:
- mmap
- hardware acceleration
- STI refactoring
 1.24 23-Mar-2022  macallan allow com at dino to actually attach
 1.23 21-Oct-2020  christos make process_machdep.c included always since it provides register i/o used by
sys_process_getlwpstatus.c which is always included.
 1.22 20-Oct-2020  christos harmonize process_machdep.c inclusion.
 1.21 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.20 16-Apr-2019  skrll branches: 1.20.2;
dino depends on gedoens
 1.19 23-Mar-2019  maxv Remove references to COMPAT_OSF1 in HPPA, it has never been supported on
this architecture.
 1.18 24-Feb-2014  skrll branches: 1.18.22; 1.18.30;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.17 05-Apr-2012  skrll branches: 1.17.2; 1.17.4;
Hook in ipifuncs.c
 1.16 02-Mar-2010  skrll branches: 1.16.10; 1.16.14;
Add a "mach frame" command to hppa ddb.
 1.15 19-Nov-2008  ad branches: 1.15.6;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.14 25-Apr-2008  skrll branches: 1.14.2; 1.14.8; 1.14.10;
Whitespace.
 1.13 24-Apr-2008  skrll Split the DDB trace stuff into its own file.
 1.12 29-Mar-2008  skrll branches: 1.12.2;
Need to pull in kobj_machdep.c for options MODULAR
 1.11 29-Jan-2008  skrll branches: 1.11.6;
Catch up with "Refactor in_cksum/in4_cksum/in6_cksum implementations".

Hi Joerg.
 1.10 25-Jan-2008  joerg Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
They call a backend function cpu_in_cksum after possibly
computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
The default implementation is moderate fast on most platforms
and provides a 32bit accumulator with 16bit addends for L32 platforms
and a 64bit accumulator with 32bit addends for L64 platforms.
It handles edge cases like very large mbuf chains (could happen with
native IPv6 in the future) and provides a good base for new native
implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
 1.9 31-Dec-2007  ad Remove COMPAT_HPUX.
 1.8 17-Oct-2007  garbled branches: 1.8.2; 1.8.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.7 07-Jul-2007  tsutsui branches: 1.7.10;
Remove leftover netns stuff.
 1.6 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.5 09-Feb-2007  ad branches: 1.5.2; 1.5.6; 1.5.8; 1.5.14;
Merge newlock2 to head.
 1.4 11-Dec-2005  christos branches: 1.4.20;
merge ktrace-lwp.
 1.3 31-Aug-2003  chs branches: 1.3.16;
update for LWPs, and some lite cleanup.
 1.2 06-Jun-2002  fredette branches: 1.2.2; 1.2.4; 1.2.10;
Added some missing files.
 1.1 05-Jun-2002  fredette Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.2.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.10.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 14-Jul-2002  gehenna catch up with -current.
 1.2.4.1 06-Jun-2002  gehenna file files.hppa was added on branch gehenna-devsw on 2002-07-14 17:47:06 +0000
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 06-Jun-2002  jdolecek file files.hppa was added on branch kqueue on 2002-06-23 17:37:03 +0000
 1.3.16.4 04-Feb-2008  yamt sync with head.
 1.3.16.3 21-Jan-2008  yamt sync with head
 1.3.16.2 03-Sep-2007  yamt sync with head.
 1.3.16.1 26-Feb-2007  yamt sync with head.
 1.4.20.1 06-Feb-2007  skrll First pass at lock stubs for hppa. They don't work yet.
 1.5.14.2 03-Oct-2007  garbled Sync with HEAD
 1.5.14.1 22-May-2007  matt Update to HEAD.
 1.5.8.1 11-Jul-2007  mjf Sync with head.
 1.5.6.2 15-Jul-2007  ad Sync with head.
 1.5.6.1 27-May-2007  ad Sync with head.
 1.5.2.1 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.7.10.3 23-Mar-2008  matt sync with HEAD
 1.7.10.2 09-Jan-2008  matt sync with HEAD
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.8.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.8.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.11.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.2.1 18-May-2008  yamt sync with head.
 1.14.10.1 19-Jan-2009  skrll Sync with HEAD.
 1.14.8.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.14.2.2 11-Mar-2010  yamt sync with head
 1.14.2.1 04-May-2009  yamt sync with head.
 1.15.6.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.16.14.1 05-Apr-2012  mrg sync to latest -current.
 1.16.10.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.10.1 17-Apr-2012  yamt sync with head
 1.17.4.1 18-May-2014  rmind sync with head
 1.17.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.30.1 10-Jun-2019  christos Sync with HEAD
 1.18.22.1 20-Apr-2019  martin Pull up following revision(s) (requested by skrll in ticket #1235):

sys/arch/hppa/conf/files.hppa: revision 1.20
sys/arch/hppa/dev/dino.c: revision 1.4

dino depends on gedoens

-

Re-arrange dino_softc members to improve alignment
 1.20.2.1 05-May-2019  isaki Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
 1.25.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 22-Aug-2015  uebayasi .init/.fini/.ctors/.dtors should be irrelevant to kernels.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 22-Sep-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file ld.script was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file ld.script was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file ld.script was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.5 10-Feb-2025  tsutsui Add virtio(4) devices and ld(4) node for qemu.

Ok'ed by skrll@. Tested on qemu 9.1.2.
 1.4 04-Apr-2020  jdolecek branches: 1.4.28;
mark nsmb major obsolete
 1.3 09-May-2016  skrll branches: 1.3.18;
Use the MI usb majors
 1.2 23-Apr-2015  pgoyette Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.2 29-May-2016  skrll Sync with HEAD
 1.1.12.1 06-Jun-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file majors.hppa was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file majors.hppa was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file majors.hppa was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.28.1 02-Aug-2025  perseant Sync with HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file std.hppa was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file std.hppa was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file std.hppa was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.4 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.3 10-Nov-2019  chs branches: 1.3.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.2 31-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10; 1.2.36;
fix eisa_intr_string
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 31-Mar-2014  tls file apic.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 31-Mar-2014  yamt file apic.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 31-Mar-2014  rmind file apic.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 14-May-2020  skrll branches: 1.2.4;
Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.40;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.40.1 03-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1035):

sys/arch/hppa/dev/lasi.c: revision 1.3
sys/arch/hppa/dev/wax.c: revision 1.2
sys/arch/hppa/dev/asp.c: revision 1.2
sys/arch/hppa/dev/dino.c: revision 1.5

Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file asp.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file asp.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file asp.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.4.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 03-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage IOMMU mappings.
 1.5 29-Sep-2022  skrll malloc -> kmem
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 14-Jun-2020  chs branches: 1.2.4;
replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file astro.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file astro.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file astro.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.4.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.2.4.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file clock.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file clock.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file clock.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3 15-Apr-2019  skrll Some KNF
 1.2 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file com_dino.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file com_dino.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file com_dino.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3 15-Apr-2019  skrll Trailing whitespace
 1.2 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file com_ssio.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file com_ssio.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file com_ssio.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3 14-Feb-2022  riastradh hppa: Membar audit in cpu.c.
 1.2 16-Apr-2020  skrll Don't KASSERT there's an FPU present. QEMU doesn't have one...
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36; 1.1.40; 1.1.46;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.46.1 20-Apr-2020  bouyer Sync with HEAD
 1.1.40.1 05-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1039):

sys/arch/hppa/dev/cpu.c: revision 1.2
sys/arch/hppa/hppa/fpu.c: revision 1.27

Don't KASSERT there's an FPU present. QEMU doesn't have one...
 1.1.36.1 21-Apr-2020  martin Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cpu.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cpu.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cpu.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cpudevs was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cpudevs was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cpudevs was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cpudevs.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cpudevs.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cpudevs.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cpudevs_data.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cpudevs_data.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cpudevs_data.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file devlist2h.awk was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file devlist2h.awk was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file devlist2h.awk was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.18 06-Apr-2025  riastradh hppa/dev: Nix trailing whitespace.

No functional change intended.
 1.17 28-Jan-2024  macallan branches: 1.17.2;
add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.16 29-Sep-2022  skrll branches: 1.16.4;
Remove unnecessary include of <sys/malloc.h>.
 1.15 16-Aug-2022  skrll Use designated initializers for hppa_pci_chipset_tag structs.
 1.14 16-Aug-2022  skrll Trailing whitespace
 1.13 18-Sep-2021  macallan explain why we skip over dev 1f func 7 in config space access functions
no functional change
 1.12 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.11 24-Apr-2021  thorpej branches: 1.11.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.10 23-Oct-2020  macallan branches: 1.10.4;
support mmap()
 1.9 16-Oct-2020  skrll Remove trailing whitespace
 1.8 16-Oct-2020  skrll KNF
 1.7 16-Oct-2020  macallan config space accesses to device 15 function 7 cause a machine check exception
on my C200, so weed them out.
Now we can scan the PCI buses without crashing.
 1.6 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.5 14-May-2020  skrll Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.4 16-Apr-2019  skrll branches: 1.4.4;
Re-arrange dino_softc members to improve alignment
 1.3 02-Oct-2015  msaitoh branches: 1.3.10; 1.3.18;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.2 31-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10; 1.2.12;
fix eisa_intr_string
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.12.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 31-Mar-2014  tls file dino.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 31-Mar-2014  yamt file dino.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 31-Mar-2014  rmind file dino.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3.18.1 10-Jun-2019  christos Sync with HEAD
 1.3.10.1 20-Apr-2019  martin Pull up following revision(s) (requested by skrll in ticket #1235):

sys/arch/hppa/conf/files.hppa: revision 1.20
sys/arch/hppa/dev/dino.c: revision 1.4

dino depends on gedoens

-

Re-arrange dino_softc members to improve alignment
 1.4.4.1 03-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1035):

sys/arch/hppa/dev/lasi.c: revision 1.3
sys/arch/hppa/dev/wax.c: revision 1.2
sys/arch/hppa/dev/asp.c: revision 1.2
sys/arch/hppa/dev/dino.c: revision 1.5

Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.10.4.2 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.10.4.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16.4.1 17-Feb-2024  martin Pull up following revision(s) (requested by macallan in ticket #592):

sys/arch/hppa/hppa/mainbus.c: revision 1.13
sys/arch/hppa/dev/elroy.c: revision 1.7
sys/arch/hppa/dev/dino.c: revision 1.17
sys/arch/hppa/include/bus_funcs.h: revision 1.2
sys/arch/hppa/include/bus_defs.h: revision 1.3

add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.17.2.1 02-Aug-2025  perseant Sync with HEAD
 1.9 29-Dec-2024  skrll KNF
 1.8 28-Dec-2024  skrll hppa: elroy: support mmap

X works, but has weird colours.
 1.7 28-Jan-2024  macallan branches: 1.7.2;
add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.6 29-Sep-2022  skrll branches: 1.6.4;
Remove unnecessary include of <sys/malloc.h>.
 1.5 16-Aug-2022  skrll Use designated initializers for hppa_pci_chipset_tag structs.
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 02-Oct-2015  msaitoh branches: 1.2.32;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file elroy.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file elroy.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file elroy.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.32.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6.4.1 17-Feb-2024  martin Pull up following revision(s) (requested by macallan in ticket #592):

sys/arch/hppa/hppa/mainbus.c: revision 1.13
sys/arch/hppa/dev/elroy.c: revision 1.7
sys/arch/hppa/dev/dino.c: revision 1.17
sys/arch/hppa/include/bus_funcs.h: revision 1.2
sys/arch/hppa/include/bus_defs.h: revision 1.3

add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file elroyreg.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file elroyreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file elroyreg.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2 31-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10;
fix eisa_intr_string
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 31-Mar-2014  tls file elroyvar.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 31-Mar-2014  yamt file elroyvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 31-Mar-2014  rmind file elroyvar.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.50;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.50.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.1.50.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file gecko.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file gecko.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file gecko.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.32 28-Oct-2025  macallan have sti_pci_check_rom() return the ROM's size so we can easily unmap it should
we so desire
 1.31 21-Oct-2025  skrll Revert changes from previous that have nothing to do with STI PCI ROM
grovelling.

Fixes the build.
 1.30 20-Oct-2025  macallan move the STI PCI ROM grovelling code into sti_pci_machdep.c instead of each
driver having its own copy
 1.29 11-Mar-2025  macallan drop unnecessary wait and register write when moving the cursor sprite
 1.28 11-Mar-2025  macallan drop the rectfill workaround here as well
 1.27 13-Nov-2024  macallan set things up even if we're not the console
 1.26 27-Oct-2024  riastradh gftfb(4): Nix trailing whitespace.

No functional change intended.
 1.25 27-Oct-2024  macallan more magic number reduction, the way colour map and cursor bitmap acess works
should be obvious now
 1.24 27-Oct-2024  macallan magic number reduction, consistently use buffer 0
 1.23 16-Oct-2024  macallan fix tpyo, now we can actually map registers from userland
 1.22 01-Oct-2024  macallan use HW to draw bitmap fonts
 1.21 30-Sep-2024  macallan use wrappers for bus_space_*() - makes things shorter, less annoying to read
and reduces unnecessary differences to hyperfb
 1.20 10-Sep-2024  macallan as suspected the Visualize EG's rectangle fill function works exactly the same
as HCRX's, so apply the same trick to draw less than 32 pixel wide rectangles
and get rid of the workaround
 1.19 28-Aug-2024  macallan properly return status info in ioctl(WSDISPLAYIO_GVIDEO)
 1.18 19-Aug-2024  macallan implement ioctl(GCID)
 1.17 01-Aug-2024  macallan fix tpyo and properly limit what we can mmap()
 1.16 17-Jul-2024  macallan remove a bunch of #defines that have been moved to stireg.h
 1.15 12-Jul-2024  macallan STIDEBUG -> GFTFB_DEBUG
 1.14 18-Apr-2024  macallan branches: 1.14.2;
allow mapping of blitter registers
 1.13 01-Apr-2024  macallan make gftfb_restore_palette() grab the default colour map from rasops instead
of just writing the driver's map into the hardware ( which may have been
modified by the likes of wsfb )
With this we get a readable console even when exiting X in a less than
graceful manner.
 1.12 28-Mar-2024  macallan For some reason the drawing engine occasionally scribbles past the right
boundary when filling rectangles, especially annoying when we draw whitespaces
As a workaround we draw all rectangles less than 50 pixels wide by drawing
a 50 pixel rectangle into off-screen memory to the right of the visible fb and
then copy the portion we want. Keeps track of the colour and size of the
off-screen rectangle so we can avoid redrawing it whenever possible.
 1.11 27-Mar-2024  macallan fix brainfart - only update fbi_fbsize, not the size of the visible fb...
 1.10 27-Mar-2024  macallan in gftfb_ioctl():
- identify ourselves as WSDISPLAY_TYPE_STI
- return full fb geometry in WSDISPLAYIO_GET_FBINFO
 1.9 06-Mar-2024  macallan if the framebuffer is wider than the visible area, use the full width for the
glyphcache
 1.8 28-Feb-2024  macallan support WSDISPLAYIO_SVIDEO so X can turn the monitor off
so far I only know how to turn off video output, not sync(s). Better than
nothing though.
 1.7 28-Feb-2024  macallan add hardware cursor support, mostly for X
 1.6 21-Feb-2024  macallan avoid one more instance of unnecessary blitter stalling
 1.5 21-Feb-2024  macallan keep track of hw settings for blitter, fill of fb access to avoid unnecessary
register writes
while there, remove some accidentially left in debug goop
 1.4 20-Feb-2024  macallan play the same lazy cursor (un)draw trick as cgsix and friends
visible speedup in things like systat
 1.3 20-Feb-2024  macallan enable glyph cache, anti-aliased fonts etc.
 1.2 15-Feb-2024  macallan blitter time!
everything except drawing characters i now done by hardware
next step - glyphcache
 1.1 13-Feb-2024  macallan crude beginning of a native driver for PCI Visualize EG cards
so far it supports:
- colour
- virtual consoles
todo:
- mmap
- hardware acceleration
- STI refactoring
 1.14.2.1 02-Aug-2025  perseant Sync with HEAD
 1.24 06-Apr-2025  riastradh branches: 1.24.4;
hppa/dev: Nix trailing whitespace.

No functional change intended.
 1.23 03-Apr-2025  macallan some cleanup:
- remove code to initialize a DAC that HCRX doesn't have
- decode / explain some more magic numbers
add more comments describing what we do and why
 1.22 17-Mar-2025  macallan remove glyphcache and debug goop
we're not likely to be able to use any off-screen memory on this hardware, so
don't pretend we will.
 1.21 05-Mar-2025  macallan now that we can draw rectangles in exactly the size we want without abusing
the pixel mask, we no longer need to draw characters in two passes - just
disable transparency, set fore- and background, and go.
Only clear the character cell when drawing blanks.
 1.20 05-Mar-2025  macallan finally figured out how to automatically mask off pixels at the right when
drawing rectangles so we can drop the workaround
 1.19 13-Nov-2024  macallan set things up even if we're not the console
 1.18 16-Oct-2024  macallan fix tpyo, now we can actually map registers from userland
 1.17 01-Oct-2024  macallan simplify putchar() a bit, use 16bit accesses for fonts that are more than 8
pixels wide
 1.16 01-Oct-2024  macallan remove sc_putchar - don't need it anymore
 1.15 11-Sep-2024  macallan now that we know how, draw characters by hardware
 1.14 04-Sep-2024  macallan get rid of the workarounds to draw rectangles less than 32 pixels wide
turns out the hardware applies a bit mask to all rectangle fills, and we
can turn the background transparent. With that we just mask off the pixels
we don't need in the less than 32 pixels wide case.
Next step - figure out how to abuse that to draw characters
I bet Visualize EG works exactly the same way in that regard.
 1.13 28-Aug-2024  macallan properly return status info in ioctl(WSDISPLAYIO_GVIDEO)
 1.12 19-Aug-2024  macallan implement ioctl(GCID)
 1.11 07-Aug-2024  riastradh hyperfb(4): Nix trailing whitespace.

No functional change intended.
 1.10 06-Aug-2024  macallan magic number reduction, NFC
 1.9 05-Aug-2024  macallan do cursor position updated the way NGLE does - poke reg 28 and wait_fifo
instead of waiting for the whole thing to go idle
 1.8 01-Aug-2024  macallan fix tpyo and properly limit what we can mmap()
 1.7 31-Jul-2024  riastradh hyperfb(4): Nix trailing whitespace, sprinkle KNF.

No functional change intended -- just whitespace (and comments).
 1.6 31-Jul-2024  macallan use the blitter to draw small rectangles as well by abusing set/clear ops
and the plane mask
 1.5 24-Jul-2024  macallan hand X a 24bit framebuffer if the hardware supports it
 1.4 17-Jul-2024  macallan remove a bunch of #defines that have been moved to stireg.h
 1.3 17-Jul-2024  macallan add cursor sprite support
 1.2 15-Jul-2024  macallan we have a blitter - use it
 1.1 12-Jul-2024  macallan first shot at a native driver for HCRX cards
this will give you a fully working wsdisplay in 8bit colour living in the
overlay planes, X/wsfb will also work.
No acceleration or cursor sprite support yet.
 1.24.4.2 02-Aug-2025  perseant Sync with HEAD
 1.24.4.1 06-Apr-2025  perseant file hyperfb.c was added on branch perseant-exfatfs on 2025-08-02 05:55:42 +0000
 1.6 24-Feb-2025  andvar s/requset/request/ in comments.
 1.5 07-Aug-2021  thorpej branches: 1.5.12;
Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 14-May-2020  skrll branches: 1.3.4;
Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.2 15-Apr-2019  skrll branches: 1.2.4;
Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lasi.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lasi.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lasi.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.4.1 03-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1035):

sys/arch/hppa/dev/lasi.c: revision 1.3
sys/arch/hppa/dev/wax.c: revision 1.2
sys/arch/hppa/dev/asp.c: revision 1.2
sys/arch/hppa/dev/dino.c: revision 1.5

Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.3.4.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lcd.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lcd.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lcd.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lpt_ssio.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lpt_ssio.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lpt_ssio.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file mem.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file mem.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file mem.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.8 19-Oct-2025  thorpej Use {,e}isabus_attach().
 1.7 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.6 24-Apr-2021  thorpej branches: 1.6.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.5 15-Apr-2019  skrll branches: 1.5.14;
Trailing whitespace
 1.4 10-Oct-2017  maya branches: 1.4.4;
Reorder to avoid null deref before null test
 1.3 31-Mar-2014  christos branches: 1.3.4; 1.3.6; 1.3.10;
fix eisa_intr_string
 1.2 26-Mar-2014  christos kill sprintf
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.3.10.3 03-Dec-2017  jdolecek update from HEAD
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 31-Mar-2014  tls file mongoose.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 31-Mar-2014  yamt file mongoose.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 31-Mar-2014  rmind file mongoose.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.4.4.1 10-Jun-2019  christos Sync with HEAD
 1.5.14.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.6 07-Sep-2025  thorpej Put the TODR handle in the pdc_softc.
 1.5 02-Apr-2025  skrll KNF
 1.4 15-Apr-2019  skrll branches: 1.4.36;
Trailing whitespace
 1.3 27-Jul-2014  dholland branches: 1.3.4; 1.3.30;
Fix typo in previous. Eesh.
 1.2 26-Jul-2014  dholland Add d_discard to a cdevsw I apparently missed.
 1.1 24-Feb-2014  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file pdc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file pdc.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.3.30.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 27-Jul-2014  tls file pdc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.4.36.1 02-Aug-2025  perseant Sync with HEAD
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.50;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.50.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.1.50.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file phantomas.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file phantomas.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file phantomas.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 15-Apr-2019  skrll Trailing whitespace
 1.2 01-Jun-2017  chs branches: 1.2.10;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 28-Aug-2017  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file power.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file power.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file power.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.10.1 10-Jun-2019  christos Sync with HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file siop_sgc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file siop_sgc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file siop_sgc.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Jul-2021  andvar branches: 1.4.2;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.3 24-Apr-2021  thorpej branches: 1.3.2;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 29-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10; 1.2.50;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.50.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 29-Mar-2014  tls file ssio.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 29-Mar-2014  yamt file ssio.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 29-Mar-2014  rmind file ssio.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3.2.1 01-Aug-2021  thorpej Sync with HEAD.
 1.4.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file ssiovar.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file ssiovar.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file ssiovar.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.4 28-Oct-2025  macallan have sti_pci_check_rom() return the ROM's size so we can easily unmap it should
we so desire
 1.3 20-Oct-2025  macallan break long lines
 1.2 20-Oct-2025  macallan move the STI PCI ROM grovelling code into sti_pci_machdep.c instead of each
driver having its own copy
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file sti_pci_machdep.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file sti_pci_machdep.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file sti_pci_machdep.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3 28-Oct-2025  macallan have sti_pci_check_rom() return the ROM's size so we can easily unmap it should
we so desire
 1.2 20-Oct-2025  macallan break long lines
 1.1 20-Oct-2025  macallan move the STI PCI ROM grovelling code into sti_pci_machdep.c instead of each
driver having its own copy
 1.4 06-Apr-2025  riastradh hppa/dev: Nix trailing whitespace.

No functional change intended.
 1.3 11-Jul-2021  tsutsui branches: 1.3.16;
Fix silent freeze on probing sti(4) framebuffer on 712/60. PR/52162

Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.
 1.2 15-Apr-2019  skrll branches: 1.2.4; 1.2.16;
Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.28; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.28.1 14-Jul-2021  martin Pull up following revision(s) (requested by tsutsui in ticket #1689):

sys/arch/hppa/dev/sti_sgc.c: revision 1.3

Fix silent freeze on probing sti(4) framebuffer on 712/60. PR/52162

Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file sti_sgc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file sti_sgc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file sti_sgc.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.16.1 01-Aug-2021  thorpej Sync with HEAD.
 1.2.4.1 14-Jul-2021  martin Pull up following revision(s) (requested by tsutsui in ticket #1322):

sys/arch/hppa/dev/sti_sgc.c: revision 1.3

Fix silent freeze on probing sti(4) framebuffer on 712/60. PR/52162

Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.
 1.3.16.1 02-Aug-2025  perseant Sync with HEAD
 1.38 02-Nov-2025  macallan more FX5/10 support:
- setup byte swapping for 8bit framebuffer access
- expose 8bit overlay on WSDISPLAYIO_MODE_MAPPED on FX5/10
with this we can run X with wsfb in 8bit with correct colours and hw cursor
 1.37 28-Oct-2025  macallan don't dump registers in the middle of setting things up...
 1.36 28-Oct-2025  macallan humble beginnings of FX5/10 support. This will:
- provide a working, accelerated console at least on my FX5
- ROPs and alpha blending don't work, so we use a putchar() based cursor()
and disable alpha fonts
- X11 can use a hw cursor and 24bit framebuffer, but since we don't know how
attributes work (yet) this will give us the blue channel piped through the
8bit palette. With a linear ramp that's at least somewhat usable.
Next steps:
- provide an 8bit fb with palette so we can run X in colour
- find the FX5's equivalent of the VISFX_FATTR register so we can either force
24bit colour or use proper WIDs
 1.35 20-Oct-2025  macallan move the STI PCI ROM grovelling code into sti_pci_machdep.c instead of each
driver having its own copy
 1.34 28-Apr-2025  macallan branches: 1.34.4;
remove code to stash the console font in video memory - this was an experiment
based on guesswork which probably won't work if the card runs in anything
other than 1280x1024, and wasn't significantly faster than drawing characters
line by line using BINC writes.
 1.33 25-Feb-2025  macallan no need to set read mode when doing host-to-vram alpha blending
while there, remove some commented out debug goop
 1.32 21-Feb-2025  andvar s/zeeo/zero/ in comment.
 1.31 09-Feb-2025  skrll Trailing whitespace
 1.30 27-Jan-2025  macallan use hardware to draw anti-aliased characters
 1.29 26-Jan-2025  macallan some minor updates:
- clear image planes before they become visible when switching to fb mode
- adjust FIFO slots, now that we knw a bit more about how they work
 1.28 07-Jan-2025  riastradh hppa/summitfb(4): Nix trailing whitespace again.
 1.27 06-Jan-2025  macallan (ab)use the image buffer as glyph cache, since on this thing we can set source
and destination buffer independently
 1.26 03-Jan-2025  skrll Use KM_SLEEP in attach path code.
 1.25 30-Dec-2024  macallan reshuffle summitfb_setup():
- remove magic number inits that are no longer magic
- annotate the remaining inits if we know the register names
- zero the attribute plane
while there, cull excessive calls to summitfb_setup()
 1.24 28-Dec-2024  macallan clean up aroound sti_fetchfonts(), mke sure we call wsfont_init() nefore
trying to add s font to the system
while there, allow mmap()in the entire fb aperture, no sense in restricting it
 1.23 27-Dec-2024  skrll Oops. Turn off debug.
 1.22 27-Dec-2024  skrll KNF

Remove some unnecessary casts and parenthesis
 1.21 26-Dec-2024  riastradh hppa/summitfb(4): Nix trailing whitespace.

No functional change intended.
 1.20 26-Dec-2024  macallan now that we can do ROPs, use them and enable all the lazy cursor update stuff
 1.19 25-Dec-2024  macallan some updates:
- setup attributes for RGB8 in the image planes and 8I in the overlay
- explicitly select LUT 0 for the overlay so we don't depend on what STI sets
anymore - now this should work on all FX cards
- expose 24bit framebuffer to X
- make sure we switch overlay transparency according to WSDISPLAY_SMODE
- remove unnecessary register writes when accessing the colour map
- no need to call summitfb_setup_fb() in summitfb_do_cursot() - that was for
HCRX and friends
- support screen blanking
 1.18 18-Dec-2024  macallan set the right cursor sprite colours, now that we know how
 1.17 16-Dec-2024  macallan avoid console output between sti_init() and wsdisplay_cnattach()
 1.16 16-Dec-2024  macallan do not zero the cursor position register on each colour map access, instead
do it when initializing fb access
-> no more disappearing cursor sprite
 1.15 16-Dec-2024  macallan remove declaration of sti_unitoroman[] since it lives in stivar.h now
 1.14 10-Dec-2024  macallan some udates:
- fetch the ROM font, convert it to ISO and hand it to wsfont so we can mimic
firmware output should we feel like it
- set read mode to match write mode whenever we touch the latter
 1.13 07-Dec-2024  riastradh hppa/summitfb(4): Nix trailing whitespace again.
 1.12 06-Dec-2024  macallan add support for alpha fonts and glyph cache, disabled by default since there
is guesswork involved
also, store bitmap fonts in video memory, mostly to show how to change colours
around
 1.11 29-Nov-2024  riastradh hppa/summitfb(4): Nix trailing whitespace.

No functional change intended.
 1.10 28-Nov-2024  macallan reshuffle unknown register inits, move the ones identified
 1.9 27-Nov-2024  riastradh hppa/summitfb(4): Nix trailing whitespace.

Plus some other minor whitespace/comment cleanups.
 1.8 27-Nov-2024  macallan some cleanup & optimization:
- don't write the pixel mask register for operations that don't use it
- track write mode, only wait if we change it
- always sync when switching in and out of fb mode ( for X... )
- drop sc_hwmode
... about 10% speedup and no more glitches when starting X
 1.7 26-Nov-2024  macallan make sure we apply the pixel mask when drawing characters so we don't scribble
outside the character cell
 1.6 26-Nov-2024  macallan now that we know how, use the blitter to:
- draw characters
- scroll
- rectangle fills
no ROP support yet, so the cursor is drawn using putchar
while there get rid of some unused cargo-culted goop from gftfb
MUCH faster now

CV: ----------------------------------------------------------------------
 1.5 20-Nov-2024  macallan use summitreg.h
 1.4 19-Nov-2024  macallan add hardware cursor support
while there remove debug goop, fix ioctl(GCID)
 1.3 19-Nov-2024  riastradh hppa/summitfb(4): Fix SUMMITFB_DEBUG build.
 1.2 19-Nov-2024  riastradh hppa/summitfb(4): KNF

No functional change intended.
 1.1 19-Nov-2024  macallan beginnings of a driver for Visualize FX graphics cards
So far it does:
- work on my FX4
- use the 8bit overlay, in R3G3B2
- all drawing by software, clear screen by hw
- X works in 8bit with wsfb
 1.34.4.2 02-Aug-2025  perseant Sync with HEAD
 1.34.4.1 28-Apr-2025  perseant file summitfb.c was added on branch perseant-exfatfs on 2025-08-02 05:55:42 +0000
 1.7 03-Dec-2023  thorpej Use vmem(9) rather than extent(9) to manage IOMMU mappings.
 1.6 29-Sep-2022  skrll malloc -> kmem
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.3 14-Jun-2020  chs branches: 1.3.4;
replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.2 15-Apr-2019  skrll Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file uturn.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file uturn.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file uturn.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.3.4.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.3.4.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 14-May-2024  andvar fix recently committed typos by msaitoh in few more places, as well as few more.
mainly s/contigous/contiguous/ and s/miliseconds/milliseconds/ in comments.
 1.3 06-May-2023  andvar few more typos in the word "register", mainly s/resister/register/.
In one comment I assume that it was meant to be pull-up resistor.
 1.2 18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file viper.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file viper.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file viper.h was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.5 24-Feb-2025  andvar s/requset/request/ in comments.
 1.4 07-Aug-2021  thorpej branches: 1.4.12;
Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.2 14-May-2020  skrll branches: 1.2.4;
Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.40;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.40.1 03-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1035):

sys/arch/hppa/dev/lasi.c: revision 1.3
sys/arch/hppa/dev/wax.c: revision 1.2
sys/arch/hppa/dev/asp.c: revision 1.2
sys/arch/hppa/dev/dino.c: revision 1.5

Mask all interrupts before reading (and clearing) the interrupt request
register in attach.

Picked up by an assert in the qemu code.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file wax.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file wax.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file wax.c was added on branch rmind-smpnet on 2014-05-18 17:45:10 +0000
 1.2.4.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file com_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file com_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file com_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file fdc_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file fdc_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file fdc_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.4 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.3 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.2 24-Apr-2021  thorpej branches: 1.2.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.50;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.50.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.1.50.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file gscbus.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file gscbus.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file gscbus.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file gscbusvar.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file gscbusvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file gscbusvar.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3 13-Jun-2022  andvar s/caled/called/ in comments and man page, also few more fixes.
 1.2 23-May-2022  andvar s/controll/control/ in comments.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file gsckbc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file gsckbc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file gsckbc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.11 15-May-2022  gutteridge harmony.c: expand and correct a couple of comments
 1.10 04-Feb-2021  isaki Simplify harmony_speed_bits().
It no longer needs to write back the speed value.
 1.9 04-Feb-2021  isaki Fix my mistakes in rev1.6.
- I had to merge the channel bit and the speed bits.
Reported by macallan@.
- I also fix my indent, while I'm here.
 1.8 03-Feb-2021  isaki Fix locking against myself.
trigger_output will be called with sc_intr_lock held.
From source code review, not tested.
 1.7 08-Jun-2019  isaki branches: 1.7.2; 1.7.10;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.
 1.6 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.5 16-Mar-2019  isaki branches: 1.5.2;
Use C99 style struct initializer to audio_hw_if.
 1.4 01-Jun-2017  chs branches: 1.4.10;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.3 13-Apr-2015  riastradh MD rnd.h cleanups. Please let me know if I broke anything!
 1.2 10-Aug-2014  tls branches: 1.2.4; 1.2.6;
Merge tls-earlyentropy branch into HEAD.
 1.1 24-Feb-2014  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file harmony.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file harmony.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1.2.1 07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.2.6.2 28-Aug-2017  skrll Sync with HEAD
 1.2.6.1 06-Jun-2015  skrll Sync with HEAD
 1.2.4.3 03-Dec-2017  jdolecek update from HEAD
 1.2.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 10-Aug-2014  tls file harmony.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.4.10.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.3 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.5.2.2 04-May-2019  isaki Remove simple flags that indicate whether the device is opened.
These are handled in the upper layer now.
 1.5.2.1 21-Apr-2019  isaki Adapt to audio2.
 1.7.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7.2.1 28-Feb-2021  martin Pull up following revision(s) (requested by isaki in ticket #1216):
sys/arch/hppa/gsc/harmony.c: revision 1.8
sys/arch/hppa/gsc/harmony.c: revision 1.9
sys/arch/hppa/gsc/harmony.c: revision 1.10

Fix locking against myself.
trigger_output will be called with sc_intr_lock held.

From source code review, not tested.

Fix my mistakes in rev1.6.
- I had to merge the channel bit and the speed bits.
Reported by macallan@.
- I also fix my indent, while I'm here.

Simplify harmony_speed_bits().
It no longer needs to write back the speed value.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file harmonyreg.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file harmonyreg.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file harmonyreg.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36; 1.1.38;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.38.2 04-May-2019  isaki Remove simple flags that indicate whether the device is opened.
These are handled in the upper layer now.
 1.1.38.1 21-Apr-2019  isaki Adapt to audio2.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file harmonyvar.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file harmonyvar.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file harmonyvar.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file hil_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file hil_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file hil_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.5 15-Apr-2020  skrll Convert PMAPDEBUG to UVMHIST
 1.4 25-Apr-2019  msaitoh branches: 1.4.8;
No functional change:
- Use __arraycount().
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.3 16-Apr-2019  skrll Trailing whitespace
 1.2 08-Feb-2018  dholland branches: 1.2.4;
Typos.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file if_ie_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file if_ie_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file if_ie_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.4.2 21-Apr-2020  martin Sync with HEAD
 1.2.4.1 10-Jun-2019  christos Sync with HEAD
 1.4.8.1 20-Apr-2020  bouyer Sync with HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file if_iee_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file if_iee_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file if_iee_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 27-Dec-2019  msaitoh s/manaul/manual/ in comment.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lpt_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lpt_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lpt_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file oosiop_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file oosiop_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file oosiop_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file osiop_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file osiop_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file osiop_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file siop_gsc.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file siop_gsc.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file siop_gsc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.4 15-Apr-2019  skrll Whitespace
 1.3 15-Apr-2019  skrll Trailing whitespace
 1.2 26-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10; 1.2.36;
kill sprintf
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.36.1 10-Jun-2019  christos Sync with HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 26-Mar-2014  tls file autoconf.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 26-Mar-2014  yamt file autoconf.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 26-Mar-2014  rmind file autoconf.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file conf.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file conf.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file conf.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.25 30-Jun-2020  maxv Make copystr() a MI C function, part of libkern and shared on all
architectures.

Notes:

- On alpha and ia64 the function is kept but gets renamed locally to avoid
symbol collision. This is because on these two arches, I am not sure
whether the ASM callers do not rely on fixed registers, so I prefer to
keep the ASM body for now.
- On Vax, only the symbol is removed, because the body is used from other
functions.
- On RISC-V, this change fixes a bug: copystr() was just a wrapper around
strlcpy(), but strlcpy() makes the operation less safe (strlen on the
source beyond its size).
- The kASan, kCSan and kMSan wrappers are removed, because now that
copystr() is in C, the compiler transformations are applied to it,
without the need for manual wrappers.

Could test on amd64 only, but should be fine.
 1.24 15-Apr-2019  skrll Trailing whitespace
 1.23 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

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

Welcome to NetBSD 8.99.37.
 1.22 06-Mar-2014  skrll branches: 1.22.30;
Whitespace
 1.21 06-Mar-2014  skrll Use %t2 instead of %ret1 for style sake only.
 1.20 06-Mar-2014  skrll Remove unnecessary %sr2 instructions in spstrcpy
 1.19 01-Oct-2011  chs branches: 1.19.2; 1.19.12; 1.19.16;
fix EXIT label for fusufault, caught by new binutils.
 1.18 07-Jul-2010  chs fix hppa ucas_*():
- "ret" is a kernel-space pointer.
- move the ucas RAS check from the device interrupt path
to the page-fault path.
 1.17 06-Jun-2010  skrll MULTIPROCESSOR fixes

- provide curcpu in a control register instead of curlwp
- define {GET,SET}_CURLWP and GET_CURCPU and use whereever possible.
- define a cpu count and use it in CPU_INFO_FOREACH

XXX hppa_ncpus isn't valid yet.
 1.16 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.15 10-Dec-2009  rmind branches: 1.15.2; 1.15.4;
Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.14 01-Dec-2009  skrll Remove U_PCB as requested by rmind.

Same code before and after.
 1.13 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.12 24-May-2009  skrll Kill '$' in exported symbols.
 1.11 09-May-2009  skrll Whitespace.
 1.10 08-May-2009  skrll Provide ucas for hppa.
 1.9 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.8 11-Aug-2008  skrll branches: 1.8.2; 1.8.8;
Fix copy{in,out}str on hppa by

1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.7 28-Apr-2008  martin branches: 1.7.2; 1.7.6;
Remove clause 3 and 4 from TNF licenses
 1.6 12-Nov-2007  skrll branches: 1.6.14; 1.6.16; 1.6.18;
Fix kernel profiling on HPPA.

- stop gcc emitting stuff that HPUX requires
- don't use splhigh() in MCOUNT_ENTER as a call to _mcount will be
generated at the moment. Disable interrupts in hardware instead.
- Fix _PROF_PROLOGUE to save/restore all the register args when calling
_mcount.
- Fixup LEAF_ENTRY to dtrt (I think) in the GPROF case.
- Provide LEAF_ENTRY_NOPROFILE and sprinkle its use where i) profiling
causes problems, e.g. trap handlers, and ii) where it just doesn't
make sense, e.g. start.
 1.5 19-Feb-2007  skrll branches: 1.5.4; 1.5.20; 1.5.22; 1.5.26; 1.5.28;
s/SPACE_CURPROC/SPACE_CURLWP/ to reflect what it actually does.
 1.4 11-Dec-2005  christos branches: 1.4.24; 1.4.26; 1.4.28; 1.4.32;
merge ktrace-lwp.
 1.3 10-Oct-2003  chs branches: 1.3.14; 1.3.16; 1.3.26; 1.3.28;
update for new gas syntax. from Jochen Kunz.
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file copy.S was added on branch gehenna-devsw on 2002-07-14 17:47:06 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file copy.S was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.3.28.1 20-Aug-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1954):
sys/arch/hppa/hppa/copy.S: revision 1.8
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.3.26.1 20-Aug-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1954):
sys/arch/hppa/hppa/copy.S: revision 1.8
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.3.16.2 15-Nov-2007  yamt sync with head.
 1.3.16.1 26-Feb-2007  yamt sync with head.
 1.3.14.1 20-Aug-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1954):
sys/arch/hppa/hppa/copy.S: revision 1.8
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.4.32.1 20-Aug-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1180):
sys/arch/hppa/hppa/copy.S: revision 1.8
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.4.28.1 04-Sep-2008  skrll Sync with netbsd-4.
 1.4.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.24.1 20-Aug-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1180):
sys/arch/hppa/hppa/copy.S: revision 1.8
Fix copy{in,out}str on hppa by
1) not attempting to copy anything if size is initially 0.
2) returning ENAMETOOLONG if we ran out of space.
 1.5.28.1 19-Nov-2007  mjf Sync with HEAD.
 1.5.26.1 13-Nov-2007  bouyer Sync with HEAD
 1.5.22.1 09-Jan-2008  matt sync with HEAD
 1.5.20.1 14-Nov-2007  joerg Sync with HEAD.
 1.5.4.1 03-Dec-2007  ad Sync with HEAD.
 1.6.18.6 11-Aug-2010  yamt sync with head.
 1.6.18.5 11-Mar-2010  yamt sync with head
 1.6.18.4 20-Jun-2009  yamt sync with head
 1.6.18.3 16-May-2009  yamt sync with head
 1.6.18.2 04-May-2009  yamt sync with head.
 1.6.18.1 16-May-2008  yamt sync with head.
 1.6.16.1 18-May-2008  yamt sync with head.
 1.6.14.2 28-Sep-2008  mjf Sync with HEAD.
 1.6.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.6.1 19-Oct-2008  haad Sync with HEAD.
 1.7.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.8.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.2.1 27-Oct-2008  skrll Commit work in progress.
 1.15.4.3 05-Mar-2011  rmind sync with head
 1.15.4.2 03-Jul-2010  rmind sync with head
 1.15.4.1 30-May-2010  rmind sync with head
 1.15.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.19.16.1 18-May-2014  rmind sync with head
 1.19.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22.30.1 10-Jun-2019  christos Sync with HEAD
 1.8 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.7 20-Nov-2019  pgoyette Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation. Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !
 1.6 04-Jan-2014  dsl branches: 1.6.30;
Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
 1.5 01-Jan-2014  dsl Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
 1.4 21-Nov-2009  rmind branches: 1.4.12; 1.4.22; 1.4.26;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.3 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.2 15-Aug-2009  matt Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
 1.1 19-Nov-2008  ad branches: 1.1.4; 1.1.6; 1.1.8; 1.1.12;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1.12.4 11-Mar-2010  yamt sync with head
 1.1.12.3 19-Aug-2009  yamt sync with head.
 1.1.12.2 04-May-2009  yamt sync with head.
 1.1.12.1 19-Nov-2008  yamt file core_machdep.c was added on branch yamt-nfs-mp on 2009-05-04 08:11:13 +0000
 1.1.8.2 19-Jan-2009  skrll Sync with HEAD.
 1.1.8.1 19-Nov-2008  skrll file core_machdep.c was added on branch nick-hppapmap on 2009-01-19 13:16:14 +0000
 1.1.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.6.1 19-Nov-2008  mjf file core_machdep.c was added on branch mjf-devfs2 on 2009-01-17 13:28:02 +0000
 1.1.4.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1 19-Nov-2008  haad file core_machdep.c was added on branch haad-dm on 2008-12-13 01:13:12 +0000
 1.4.26.1 18-May-2014  rmind sync with head
 1.4.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.12.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.30.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 05-Apr-2012  skrll branches: 1.1.2; 1.1.4;
Split out cpu_softc into cpuvar.h

Split out the interrupt definitions into intrdefs.h and add the IPI
definitions

Add the required field to cpu_info for the IPI functions.

Makes a MULTIPROCESSOR kernel compiles.
 1.1.4.2 17-Apr-2012  yamt sync with head
 1.1.4.1 05-Apr-2012  yamt file cpuvar.h was added on branch yamt-pagecache on 2012-04-17 00:06:26 +0000
 1.1.2.2 05-Apr-2012  mrg sync to latest -current.
 1.1.2.1 05-Apr-2012  mrg file cpuvar.h was added on branch jmcneill-usbmp on 2012-04-05 21:33:15 +0000
 1.18 17-Apr-2022  andvar fix various typos in comments.
 1.17 21-Feb-2018  skrll Avoid UB (shift of negative number)
 1.16 18-Jan-2012  skrll Support crash(8) on hppa.
 1.15 17-Jan-2012  skrll Fix the symbol lookup on branches, etc.
 1.14 17-Jan-2012  skrll Add some space to the output.
 1.13 16-Jan-2012  skrll Don't NULL deref on unknown subop, e.g. PA2.0 instruction.

Print undefined instead of ???.
 1.12 03-Nov-2009  snj branches: 1.12.12; 1.12.16;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.11 04-Mar-2007  christos branches: 1.11.44;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.10 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.9 25-Feb-2006  wiz branches: 1.9.20;
Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
 1.8 11-Dec-2005  christos branches: 1.8.2; 1.8.4; 1.8.6;
merge ktrace-lwp.
 1.7 03-Jun-2005  chs branches: 1.7.2;
adapt to const changes.
 1.6 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.5 28-Nov-2003  chs de-__P, remove register, ansify.
 1.4 01-Nov-2003  matt Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file db_disasm.c was added on branch gehenna-devsw on 2002-07-14 17:47:07 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file db_disasm.c was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.7.2.3 03-Sep-2007  yamt sync with head.
 1.7.2.2 26-Feb-2007  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.8.2.1 01-Mar-2006  yamt sync with head.
 1.9.20.2 12-Mar-2007  rmind Sync with HEAD.
 1.9.20.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.44.1 11-Mar-2010  yamt sync with head
 1.12.16.1 18-Feb-2012  mrg merge to -current.
 1.12.12.1 17-Apr-2012  yamt sync with head
 1.28 26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.27 18-Jan-2012  skrll Support crash(8) on hppa.
 1.26 22-Jan-2011  skrll branches: 1.26.4; 1.26.8;
A couple more registers and their common usage.
 1.25 22-Jan-2011  skrll Save CR24 and CR27 and report in ddb.
 1.24 22-Jan-2011  skrll Have the register number and usage available.
 1.23 22-Jan-2011  skrll Whitespace.
 1.22 04-Jun-2010  skrll branches: 1.22.2; 1.22.4;
Misc KNF.
 1.21 11-Mar-2010  skrll branches: 1.21.2;
Rename Debugger to cpu_Debugger.
 1.20 21-Nov-2009  rmind branches: 1.20.2;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.19 15-Nov-2009  dholland Declare trap name array as extern const char *[] to match how it's defined
in trap.c. (Should really be in a header, of course.) Compile-tested.
 1.18 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.17 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.16 24-Apr-2008  skrll branches: 1.16.2; 1.16.10; 1.16.16;
Split the DDB trace stuff into its own file.
 1.15 21-Dec-2007  skrll branches: 1.15.6; 1.15.8;
Improve ddb backtraces by:

- Starting with the right set of fp, pc, and rp in all cases.
- Dropping the argument printing stuff as it could never work.
- Backtrace through traps and decode syscalls properly by
making sure the trapframe is at a known offset from the stack
pointer in both cases. Also, ensure that the frame pointer
is zero so that we can detect traps.
 1.14 20-Dec-2007  skrll Fix typo that broke bt /a with curlwp
 1.13 22-Feb-2007  skrll branches: 1.13.22; 1.13.30; 1.13.34;
Update for change in db_stack_trace_print prototype
 1.12 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.11 21-Feb-2007  thorpej Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.10 21-Feb-2007  skrll - Add /a modifier to trace that allows a specific LWP to be selected.
- When doing trace/t, always note which pid/lid combination is being traced

XXX This probably shouldn't be in this file.
 1.9 26-Aug-2006  skrll branches: 1.9.8;
Pull across the stack trace stuff from OpenBSD.
 1.8 07-Jul-2006  skrll Disable DDB_DEBUG by default
 1.7 03-Jul-2006  skrll Actually drop into ddb for unknown traps (with the right conditions)
 1.6 24-Dec-2005  perry branches: 1.6.4; 1.6.8; 1.6.16;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 30-May-2005  chs branches: 1.4.2;
adapt to const changes.
 1.3 28-Nov-2003  chs de-__P, remove register, ansify.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file db_interface.c was added on branch gehenna-devsw on 2002-07-14 17:47:08 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file db_interface.c was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.4.2.4 21-Jan-2008  yamt sync with head
 1.4.2.3 26-Feb-2007  yamt sync with head.
 1.4.2.2 30-Dec-2006  yamt sync with head.
 1.4.2.1 21-Jun-2006  yamt sync with head.
 1.6.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.6.8.2 03-Sep-2006  yamt sync with head.
 1.6.8.1 11-Aug-2006  yamt sync with head
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.9.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.13.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.13.30.1 26-Dec-2007  ad Sync with head.
 1.13.22.1 09-Jan-2008  matt sync with HEAD
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.16.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16.10.1 27-Oct-2008  skrll Commit work in progress.
 1.16.2.3 11-Aug-2010  yamt sync with head.
 1.16.2.2 11-Mar-2010  yamt sync with head
 1.16.2.1 04-May-2009  yamt sync with head.
 1.20.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.20.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.21.2.2 05-Mar-2011  rmind sync with head
 1.21.2.1 03-Jul-2010  rmind sync with head
 1.22.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.22.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.26.8.1 18-Feb-2012  mrg merge to -current.
 1.26.4.1 17-Apr-2012  yamt sync with head
 1.10 24-Feb-2022  skrll whitespace
 1.9 23-Feb-2021  mrg introduce DDB_END_CMD and replace more than 20 copies of the same
list of NULLs and 0. idea from rillig@.

all touched ports built, several booted.
 1.8 15-Apr-2019  skrll branches: 1.8.12;
Trailing whitespace
 1.7 02-Apr-2012  skrll branches: 1.7.40;
Fix crash(8) build on hppa.
 1.6 29-Mar-2012  skrll Use PSW_BITS to decode the bits of the PSW in db_dump_trap
 1.5 18-Jan-2012  skrll Support crash(8) on hppa.
 1.4 31-Dec-2011  skrll Fix the usage/help for mach frame.
 1.3 22-Jan-2011  skrll branches: 1.3.4; 1.3.8;
Save CR24 and CR27 and report in ddb.
 1.2 15-Nov-2010  uebayasi branches: 1.2.2; 1.2.4;
struct lwp * deref needs sys/lwp.h.
 1.1 02-Mar-2010  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Add a "mach frame" command to hppa ddb.
 1.1.6.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.6.1 02-Mar-2010  uebayasi file db_machdep.c was added on branch uebayasi-xip on 2010-04-30 14:39:27 +0000
 1.1.4.1 05-Mar-2011  rmind sync with head
 1.1.2.2 11-Mar-2010  yamt sync with head
 1.1.2.1 02-Mar-2010  yamt file db_machdep.c was added on branch yamt-nfs-mp on 2010-03-11 15:02:26 +0000
 1.2.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.2.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.8.2 05-Apr-2012  mrg sync to latest -current.
 1.3.8.1 18-Feb-2012  mrg merge to -current.
 1.3.4.1 17-Apr-2012  yamt sync with head
 1.7.40.1 10-Jun-2019  christos Sync with HEAD
 1.8.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.7 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.6 11-Dec-2005  christos branches: 1.6.78;
merge ktrace-lwp.
 1.5 03-Jun-2005  chs adapt to const changes.
 1.4 28-Nov-2003  chs de-__P, remove register, ansify.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file db_memrw.c was added on branch gehenna-devsw on 2002-07-14 17:47:08 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file db_memrw.c was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.6.78.1 11-Mar-2010  yamt sync with head
 1.13 19-Oct-2013  skrll #if 0 some unsed code which should probably be finished.
 1.12 18-Jan-2012  skrll branches: 1.12.6; 1.12.10;
Support crash(8) on hppa.
 1.11 17-Jan-2012  skrll Remove comment that shouldn't have crept in.
 1.10 28-Feb-2011  skrll branches: 1.10.4; 1.10.8;
Add the trapframe pointer to the syscall information.
 1.9 01-Jul-2010  rmind branches: 1.9.2; 1.9.4;
Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour. Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
 1.8 11-Mar-2010  skrll branches: 1.8.2;
Wrap a long line.
 1.7 11-Mar-2010  skrll Comment change.
 1.6 21-Nov-2009  rmind branches: 1.6.2;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.5 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.4 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.3 27-Nov-2008  skrll Print the trapframe pointer in the trace output.
 1.2 02-Jul-2008  rmind branches: 1.2.2; 1.2.4;
Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
 1.1 24-Apr-2008  skrll branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8; 1.1.10;
Split the DDB trace stuff into its own file.
 1.1.10.1 03-Jul-2008  simonb Sync with head.
 1.1.8.4 17-Jan-2009  mjf Sync with HEAD.
 1.1.8.3 28-Sep-2008  mjf Sync with HEAD.
 1.1.8.2 02-Jun-2008  mjf Sync with HEAD.
 1.1.8.1 24-Apr-2008  mjf file db_trace.c was added on branch mjf-devfs2 on 2008-06-02 13:22:12 +0000
 1.1.6.2 18-May-2008  yamt sync with head.
 1.1.6.1 24-Apr-2008  yamt file db_trace.c was added on branch yamt-pf42 on 2008-05-18 12:32:07 +0000
 1.1.4.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.3 11-Aug-2010  yamt sync with head.
 1.1.2.2 11-Mar-2010  yamt sync with head
 1.1.2.1 04-May-2009  yamt sync with head.
 1.2.4.1 11-Dec-2008  skrll Merge from HEAD.
 1.2.2.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.6.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.8.2.2 05-Mar-2011  rmind sync with head
 1.8.2.1 03-Jul-2010  rmind sync with head
 1.9.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.9.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.10.8.1 18-Feb-2012  mrg merge to -current.
 1.10.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.4.1 17-Apr-2012  yamt sync with head
 1.12.10.1 18-May-2014  rmind sync with head
 1.12.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4 17-Apr-2019  skrll Get a large enough buffer for the LIF DIR
 1.3 03-Apr-2019  christos centralize setdisklabel(9)
 1.2 18-Oct-2014  snj branches: 1.2.12; 1.2.20;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file disksubr.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file disksubr.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file disksubr.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.20.1 10-Jun-2019  christos Sync with HEAD
 1.2.12.1 20-Apr-2019  martin Pull up following revision(s) (requested by skrll in ticket #1234):

sys/arch/hppa/hppa/disksubr.c: revision 1.4

Get a large enough buffer for the LIF DIR
 1.8 07-Sep-2024  andvar spelling and grammar fixes, mainly in comments.
 1.7 15-Apr-2019  skrll branches: 1.7.36;
Trailing whitespace
 1.6 03-Nov-2009  snj branches: 1.6.64;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.5 24-May-2009  skrll Kill '$' in exported symbols.
 1.4 12-Nov-2007  skrll branches: 1.4.18;
Fix kernel profiling on HPPA.

- stop gcc emitting stuff that HPUX requires
- don't use splhigh() in MCOUNT_ENTER as a call to _mcount will be
generated at the moment. Disable interrupts in hardware instead.
- Fix _PROF_PROLOGUE to save/restore all the register args when calling
_mcount.
- Fixup LEAF_ENTRY to dtrt (I think) in the GPROF case.
- Provide LEAF_ENTRY_NOPROFILE and sprinkle its use where i) profiling
causes problems, e.g. trap handlers, and ii) where it just doesn't
make sense, e.g. start.
 1.3 11-Dec-2005  christos branches: 1.3.30; 1.3.48; 1.3.50; 1.3.54; 1.3.56;
merge ktrace-lwp.
 1.2 10-Oct-2003  chs branches: 1.2.16;
update for new gas syntax. from Jochen Kunz.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fpemu.S was added on branch gehenna-devsw on 2002-07-14 17:47:09 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fpemu.S was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.2.16.1 15-Nov-2007  yamt sync with head.
 1.3.56.1 19-Nov-2007  mjf Sync with HEAD.
 1.3.54.1 13-Nov-2007  bouyer Sync with HEAD
 1.3.50.1 09-Jan-2008  matt sync with HEAD
 1.3.48.1 14-Nov-2007  joerg Sync with HEAD.
 1.3.30.1 03-Dec-2007  ad Sync with HEAD.
 1.4.18.2 11-Mar-2010  yamt sync with head
 1.4.18.1 20-Jun-2009  yamt sync with head
 1.6.64.1 10-Jun-2019  christos Sync with HEAD
 1.7.36.1 02-Aug-2025  perseant Sync with HEAD
 1.27 16-Apr-2020  skrll Don't KASSERT there's an FPU present. QEMU doesn't have one...
 1.26 15-Apr-2019  skrll branches: 1.26.4; 1.26.10;
Trailing whitespace
 1.25 14-Nov-2018  skrll Some fixes for QEMU/hppa.

Don't call desidhash_l on pcxl2 as it doesn't support it. QEMU emulates
this cpu and would trap on illegal instruction for the diag in desidhash_l

Allow a FPU to be missing... more fixes are likely here.

QEMU doesn't set C bit properly yet
 1.24 06-Apr-2012  skrll branches: 1.24.32; 1.24.38; 1.24.40;
unifdef FPEMUL. All our supported systems have an FPU.
 1.23 23-Jan-2011  skrll branches: 1.23.4; 1.23.8;
Make some more information (psw/fpu_state) per cpu.
 1.22 14-Jan-2011  rmind branches: 1.22.2; 1.22.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.21 04-Jun-2010  skrll Misc KNF.
 1.20 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.19 21-Nov-2009  rmind branches: 1.19.2; 1.19.4;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.18 24-May-2009  skrll u_intNN_t -> uintNN_t

"same" code before and after.
 1.17 30-Apr-2009  skrll Move HPPA_SID_KERNEL into pmap.h and deal with the move.
 1.16 28-Aug-2008  skrll branches: 1.16.8;
Whitespace.
 1.15 28-Apr-2008  martin branches: 1.15.2; 1.15.6;
Remove clause 3 and 4 from TNF licenses
 1.14 07-Mar-2007  he branches: 1.14.40; 1.14.42; 1.14.44;
Change a cast from void* to char* due to the need to do pointer arithmetic.
 1.13 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12 24-Dec-2005  perry branches: 1.12.26;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 31-May-2005  chs branches: 1.10.2;
avoid a shadow.
 1.9 01-May-2005  chs paranoia: move the dcache flush to the end.
 1.8 24-Jul-2004  chs real siginfo support.
 1.7 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.6 15-Jun-2004  chs flush the dcache after accessing pcb_fpregs.
we access it with the DTLB both on and off,
so we need to avoid bad cache aliases.
 1.5 26-Mar-2004  drochner To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
 1.4 28-Nov-2003  chs de-__P, remove register, ansify.
 1.3 25-Oct-2003  chs NULL -> 0
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fpu.c was added on branch gehenna-devsw on 2002-07-14 17:47:09 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fpu.c was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.10.2.2 03-Sep-2007  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.12.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.14.44.5 11-Aug-2010  yamt sync with head.
 1.14.44.4 11-Mar-2010  yamt sync with head
 1.14.44.3 20-Jun-2009  yamt sync with head
 1.14.44.2 04-May-2009  yamt sync with head.
 1.14.44.1 16-May-2008  yamt sync with head.
 1.14.42.1 18-May-2008  yamt sync with head.
 1.14.40.2 28-Sep-2008  mjf Sync with HEAD.
 1.14.40.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.6.1 19-Oct-2008  haad Sync with HEAD.
 1.15.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.16.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.4.3 05-Mar-2011  rmind sync with head
 1.19.4.2 03-Jul-2010  rmind sync with head
 1.19.4.1 30-May-2010  rmind sync with head
 1.19.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.19.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.22.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.22.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.23.8.1 29-Apr-2012  mrg sync to latest -current.
 1.23.4.1 17-Apr-2012  yamt sync with head
 1.24.40.2 21-Apr-2020  martin Sync with HEAD
 1.24.40.1 10-Jun-2019  christos Sync with HEAD
 1.24.38.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.24.32.1 26-Apr-2019  martin Pull up following revision(s) (requested by skrll in ticket #1248):

sys/arch/hppa/hppa/machdep.c: revision 1.9
sys/arch/hppa/hppa/fpu.c: revision 1.25

Some fixes for QEMU/hppa.

Don't call desidhash_l on pcxl2 as it doesn't support it. QEMU emulates
this cpu and would trap on illegal instruction for the diag in desidhash_l

Allow a FPU to be missing... more fixes are likely here.

QEMU doesn't set C bit properly yet
 1.26.10.1 20-Apr-2020  bouyer Sync with HEAD
 1.26.4.1 05-Aug-2020  martin Pull up following revision(s) (requested by skrll in ticket #1039):

sys/arch/hppa/dev/cpu.c: revision 1.2
sys/arch/hppa/hppa/fpu.c: revision 1.27

Don't KASSERT there's an FPU present. QEMU doesn't have one...
 1.5 23-Jul-2023  skrll PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN

Provide syscall_intern and use the md_syscall in syscall trap handling.
 1.4 14-Mar-2020  ad Remove unused RW lock defs.
 1.3 20-Feb-2020  skrll G/C
 1.2 08-Jan-2020  ad Hopefully fix some problems seen with MP support on non-x86, in particular
where curcpu() is defined as curlwp->l_cpu:

- mi_switch(): undo the ~2007ish optimisation to unlock curlwp before
calling cpu_switchto(). It's not safe to let other actors mess with the
LWP (in particular l->l_cpu) while it's still context switching. This
removes l->l_ctxswtch.

- Move the LP_RUNNING flag into l->l_flag and rename to LW_RUNNING since
it's now covered by the LWP's lock.

- Ditch lwp_exit_switchaway() and just call mi_switch() instead. Everything
is in cache anyway so it wasn't buying much by trying to avoid saving old
state. This means cpu_switchto() will never be called with prevlwp ==
NULL.

- Remove some KERNEL_LOCK handling which hasn't been needed for years.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36; 1.1.42;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.42.2 29-Feb-2020  ad Sync with head.
 1.1.42.1 17-Jan-2020  ad Sync with head.
 1.1.36.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file genassym.cf was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file genassym.cf was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file genassym.cf was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.33 13-May-2022  skrll port-hppa/56830: RAS support is slightly incorrect on hppa

When searching for RAS use tf_iioq_head without the HPPA_PC_PRIV_MASK bits
set.
 1.32 22-Aug-2021  andvar s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor.
 1.31 16-Apr-2020  skrll Fix cur{lwp,cpu} and other bits for MODULES
 1.30 23-Nov-2019  ad branches: 1.30.6;
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.29 24-Feb-2014  skrll branches: 1.29.30; 1.29.34;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.28 21-May-2012  martin branches: 1.28.2; 1.28.4;
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
 1.27 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.26 08-Dec-2011  skrll branches: 1.26.2;
Track if we saved l_private in the mcontext and don't blindly restore it.

This fixes the tests in /usr/tests/lib/libc/setjmp/t_threadjmp
 1.25 24-Feb-2011  skrll branches: 1.25.4; 1.25.8;
Get sr4 in cpu_getmcontext.

hi joerg.
 1.24 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.23 14-Jan-2011  rmind branches: 1.23.2; 1.23.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.22 06-Apr-2010  skrll Use hppa_cpu_ispa20_p
 1.21 03-Apr-2010  skrll Add md_astpending to struct mdlwp and use it.
 1.20 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.19 16-Jan-2010  skrll branches: 1.19.2; 1.19.4;
Tweak astpending handling.
 1.18 21-Nov-2009  rmind Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.17 01-Jun-2009  skrll Enforce strong ordering (for now) on PA2.0.
 1.16 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.15 16-Oct-2008  skrll branches: 1.15.2; 1.15.8;
p_smutex was replaced by p_lock.
 1.14 15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.13 28-Apr-2008  martin branches: 1.13.2; 1.13.6;
Remove clause 3 and 4 from TNF licenses
 1.12 24-Apr-2008  ad branches: 1.12.2;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.11 17-Oct-2007  garbled branches: 1.11.16; 1.11.18;
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.10 02-Oct-2007  skrll Make want_resched a member of cpu_info.
 1.9 17-May-2007  yamt branches: 1.9.8; 1.9.10; 1.9.12;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.8 04-Mar-2007  christos branches: 1.8.2; 1.8.4; 1.8.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 09-Feb-2007  ad branches: 1.7.2;
Merge newlock2 to head.
 1.6 25-Oct-2006  skrll Fix the code to deal with new gcc propagating const-ness from structs to
members. All fixups of the mcontext are done in the trapframe.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 18-Jul-2004  chs branches: 1.4.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file hppa_machdep.c was added on branch gehenna-devsw on 2002-07-14 17:47:10 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file hppa_machdep.c was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.4.12.4 27-Oct-2007  yamt sync with head.
 1.4.12.3 03-Sep-2007  yamt sync with head.
 1.4.12.2 26-Feb-2007  yamt sync with head.
 1.4.12.1 30-Dec-2006  yamt sync with head.
 1.5.22.1 10-Dec-2006  yamt sync with head.
 1.5.20.3 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.5.20.2 29-Jan-2007  ad Make hp700 compile.
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.7.2.2 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.7.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.10.2 03-Oct-2007  garbled Sync with HEAD
 1.8.10.1 22-May-2007  matt Update to HEAD.
 1.8.4.1 11-Jul-2007  mjf Sync with head.
 1.8.2.2 09-Oct-2007  ad Sync with head.
 1.8.2.1 27-May-2007  ad Sync with head.
 1.9.12.1 06-Oct-2007  yamt sync with head.
 1.9.10.1 06-Nov-2007  matt sync with HEAD
 1.9.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.11.18.1 18-May-2008  yamt sync with head.
 1.11.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.11.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.2.5 11-Aug-2010  yamt sync with head.
 1.12.2.4 11-Mar-2010  yamt sync with head
 1.12.2.3 20-Jun-2009  yamt sync with head
 1.12.2.2 04-May-2009  yamt sync with head.
 1.12.2.1 16-May-2008  yamt sync with head.
 1.13.6.1 19-Oct-2008  haad Sync with HEAD.
 1.13.2.3 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.13.2.2 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

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

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

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

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

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

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.15.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.2.1 27-Oct-2008  skrll Commit work in progress.
 1.19.4.2 05-Mar-2011  rmind sync with head
 1.19.4.1 30-May-2010  rmind sync with head
 1.19.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.23.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.23.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.8.3 02-Jun-2012  mrg sync to latest -current.
 1.25.8.2 24-Feb-2012  mrg sync to -current.
 1.25.8.1 18-Feb-2012  mrg merge to -current.
 1.25.4.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.4.2 23-May-2012  yamt sync with head.
 1.25.4.1 17-Apr-2012  yamt sync with head
 1.26.2.1 21-May-2012  riz Pull up following revision(s) (requested by martin in ticket #274):
sys/arch/amd64/amd64/process_machdep.c: revision 1.20
sys/kern/sys_lwp.c: revision 1.54
sys/arch/sparc64/sparc64/machdep.c: revision 1.267
sys/arch/mips/mips/cpu_subr.c: revision 1.16
sys/arch/vax/vax/machdep.c: revision 1.188
sys/sys/lwp.h: revision 1.161
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
sys/arch/alpha/alpha/machdep.c: revision 1.339
sys/compat/sys/ucontext.h: revision 1.6
sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
distrib/sets/lists/tests/mi: revision 1.469
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
tests/lib/libc/sys/t_lwp_create.c: revision 1.1
tests/lib/libc/sys/Makefile: revision 1.23
sys/arch/arm/arm/sig_machdep.c: revision 1.42
sys/arch/amd64/include/mcontext.h: revision 1.15
sys/arch/amd64/amd64/machdep.c: revision 1.183
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
sys/arch/i386/i386/machdep.c: revision 1.727
sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
sys/arch/sparc/sparc/machdep.c: revision 1.319
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
sys/sys/ucontext.h: revision 1.16
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.
 1.28.4.1 18-May-2014  rmind sync with head
 1.28.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.34.1 14-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1446):

sys/arch/hppa/hppa/hppa_machdep.c: revision 1.33

port-hppa/56830: RAS support is slightly incorrect on hppa

When searching for RAS use tf_iioq_head without the HPPA_PC_PRIV_MASK bits
set.
 1.29.30.2 21-Apr-2020  martin Sync with HEAD
 1.29.30.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.30.6.1 20-Apr-2020  bouyer Sync with HEAD
 1.6 15-Apr-2019  skrll Trailing whitespace
 1.5 03-Nov-2009  snj branches: 1.5.64;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.4 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 11-Aug-2002  fredette branches: 1.2.108; 1.2.110; 1.2.112;
Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache. If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file hpt.h was added on branch gehenna-devsw on 2002-07-14 17:47:10 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file hpt.h was added on branch kqueue on 2002-06-23 17:37:04 +0000
 1.2.112.3 11-Mar-2010  yamt sync with head
 1.2.112.2 04-May-2009  yamt sync with head.
 1.2.112.1 16-May-2008  yamt sync with head.
 1.2.110.1 18-May-2008  yamt sync with head.
 1.2.108.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.4 14-Feb-2009  skrll G/C KERNEL_ACCESS_ID
 1.3.8.3 14-Feb-2009  skrll Better description for hpt_entry.

G/C old struct pv_entry.
 1.3.8.2 15-Dec-2008  skrll G/C some old stuff.
 1.3.8.1 27-Oct-2008  skrll Commit work in progress.
 1.5.64.1 10-Jun-2019  christos Sync with HEAD
 1.4 14-May-2022  skrll Add some special NOPs to help qemu.

thanks to Helge Deller for the heads-up.
 1.3 15-Apr-2019  skrll branches: 1.3.4;
Trailing whitespace
 1.2 17-May-2007  yamt branches: 1.2.2; 1.2.4; 1.2.16; 1.2.128;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.1 23-Mar-2007  skrll branches: 1.1.2;
file idle_machdep.c was initially added on branch yamt-idlelwp.
 1.1.2.1 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.2.128.1 10-Jun-2019  christos Sync with HEAD
 1.2.16.2 03-Sep-2007  yamt sync with head.
 1.2.16.1 17-May-2007  yamt file idle_machdep.c was added on branch yamt-lazymbuf on 2007-09-03 14:26:22 +0000
 1.2.4.2 11-Jul-2007  mjf Sync with head.
 1.2.4.1 17-May-2007  mjf file idle_machdep.c was added on branch mjf-ufs-trans on 2007-07-11 19:59:32 +0000
 1.2.2.4 18-Jul-2007  ad Fix merge errors.
 1.2.2.3 15-Jul-2007  ad Sync with head.
 1.2.2.2 09-Jun-2007  ad Sync with head.
 1.2.2.1 17-May-2007  ad file idle_machdep.c was added on branch vmlocking on 2007-06-09 21:36:51 +0000
 1.3.4.1 14-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1448):

sys/arch/hppa/hppa/idle_machdep.c: revision 1.4
sys/arch/hppa/hppa/machdep.c: revision 1.17

Add some special NOPs to help qemu.
thanks to Helge Deller for the heads-up.
 1.8 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.7 24-Dec-2005  perry branches: 1.7.78;
bare asm -> __asm
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 20-May-2005  chs branches: 1.5.2;
only lvalues can be incremented. found by gcc4.
 1.4 28-Nov-2003  chs de-__P, remove register, ansify.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file in_cksum.c was added on branch gehenna-devsw on 2002-07-14 17:47:10 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file in_cksum.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.5.2.1 21-Jun-2006  yamt sync with head.
 1.7.78.1 11-Mar-2010  yamt sync with head
 1.8 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.7 19-May-2022  skrll port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras
 1.6 26-Feb-2022  macallan unmask interrupt bits leading to other interrupt registers
now hardware interrupts actually fire instead of being found pending by the
timer interrupt
with this SCSI throughput on my c360 is what you'd expect from an UW esiop
 1.5 07-Sep-2021  andvar s/aquire/acquire/ in comments, also one typo fix acqure->acquire.
 1.4 01-Jul-2021  macallan fix off by one which resulted in all idle time reported as interrupt time
final fix from nick@
 1.3 04-May-2019  skrll branches: 1.3.2; 1.3.14;
Whitespace
 1.2 15-Apr-2019  skrll Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file intr.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file intr.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file intr.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3.14.1 01-Aug-2021  thorpej Sync with HEAD.
 1.3.2.1 06-Jul-2021  martin Pull up following revision(s) (requested by macallan in ticket #1312):

sys/arch/hppa/hppa/intr.c: revision 1.4

fix off by one which resulted in all idle time reported as interrupt time
final fix from nick@
 1.7 09-Apr-2022  riastradh hppa: Convert ipiuncs.c to membar_release/acquire.
 1.6 12-Feb-2022  riastradh hppa: Membar audit in ipifuncs.c.
 1.5 15-Apr-2019  skrll Trailing whitespace
 1.4 23-May-2014  skrll branches: 1.4.28;
Make this compile. Hi rmind!
 1.3 19-May-2014  rmind Implement MI IPI interface with cross-call support.
 1.2 05-Apr-2012  skrll branches: 1.2.2; 1.2.4; 1.2.6; 1.2.16;
bah, remove a load of old (debug) code.
 1.1 05-Apr-2012  skrll Commit work in progress ipi functions.
 1.2.16.1 10-Aug-2014  tls Rebase.
 1.2.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 17-Apr-2012  yamt sync with head
 1.2.4.1 05-Apr-2012  yamt file ipifuncs.c was added on branch yamt-pagecache on 2012-04-17 00:06:26 +0000
 1.2.2.2 05-Apr-2012  mrg sync to latest -current.
 1.2.2.1 05-Apr-2012  mrg file ipifuncs.c was added on branch jmcneill-usbmp on 2012-04-05 21:33:15 +0000
 1.4.28.1 10-Jun-2019  christos Sync with HEAD
 1.11 03-Sep-2023  andvar remove (db_addr_t) cast in hppa PC_REGS(regs) definition.
rename tf_hptm to tf_cr24 in kgdb_hppa.c.
This name was lost from trapframe (frame.h) in v1.8 and restored as tf_cr24 in v1.12.

Fixes KGDB enabled build for hppa.
 1.10 06-Sep-2021  andvar fix various typos in comments.
 1.9 15-Apr-2019  skrll Trailing whitespace
 1.8 22-Jan-2011  skrll branches: 1.8.56;
Save CR24 and CR27 and report in ddb.
 1.7 04-Jun-2010  skrll branches: 1.7.2; 1.7.4;
Misc KNF.
 1.6 24-Dec-2005  perry branches: 1.6.78; 1.6.98; 1.6.100;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 28-Nov-2003  chs branches: 1.4.16;
de-__P, remove register, ansify.
 1.3 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.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file kgdb_hppa.c was added on branch gehenna-devsw on 2002-07-14 17:47:11 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file kgdb_hppa.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.6.100.2 05-Mar-2011  rmind sync with head
 1.6.100.1 03-Jul-2010  rmind sync with head
 1.6.98.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.78.1 11-Aug-2010  yamt sync with head.
 1.7.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.56.1 10-Jun-2019  christos Sync with HEAD
 1.16 28-Apr-2023  skrll Pass local symbols relocations in both passes and provide the kobj_reloc
implementation visibility of these relocations.

Currently all implementations resolve local symbol relocations in the first
pass and simply skip them in the second. The RISC-V implementation will
make use of this visiblity.
 1.15 03-Nov-2017  maxv Handle absolute relocations coming from the kernel: preserve SHN_ABS in
the kernel and module symbols, and when relocating a symbol that has
SHN_ABS, take its value as-is and don't return an error if it equals zero.

Sent on tech-kern@.
 1.14 01-Feb-2014  skrll Deal with unaligned DIR32 relocs as found in debug information.
 1.13 16-Nov-2013  skrll Support PCREL32 (for EH sections)
 1.12 15-Nov-2013  skrll Simplify
 1.11 06-Aug-2013  skrll Whitespace
 1.10 06-Aug-2013  skrll Implement DIR17R. All the module tests pass now.
 1.9 06-Aug-2013  skrll Split the reloc evaluation from the value encoding part. Several relocs
can share the value encoding part.

Fixes the SEGREL32 relocs while here.
 1.8 06-Aug-2013  skrll Re-order relocation in switch statement. No functional change.
 1.7 06-Jan-2012  skrll branches: 1.7.6; 1.7.10;
Flush the d-cache and i-cache to make sure the text area of the module
is dealt with properly.
 1.6 13-Dec-2011  skrll Fix DIR21L relocations where we missed a bit of 'b'

Add support for DPREL relocations.

Modulo debug information in modules /usr/tests/modules now passes all
tests on NetBSD/hp700 (with a MODULAR kernel)
 1.5 30-Apr-2009  skrll branches: 1.5.12; 1.5.16;
Move HPPA_SID_KERNEL into pmap.h and deal with the move.
 1.4 28-Apr-2008  martin branches: 1.4.14;
Remove clause 3 and 4 from TNF licenses
 1.3 01-Mar-2008  skrll branches: 1.3.2; 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12;
Arrgh.

Must try to develop and commit from the same machine.
 1.2 01-Mar-2008  skrll Oops, fix compilation errors.

I have tested this - it's enough to load sys/modules/example.o.

Honest!
 1.1 01-Mar-2008  skrll hppa bits for the kernel linker.
 1.3.12.2 04-May-2009  yamt sync with head.
 1.3.12.1 16-May-2008  yamt sync with head.
 1.3.10.1 18-May-2008  yamt sync with head.
 1.3.8.3 02-Jun-2008  mjf Sync with HEAD.
 1.3.8.2 03-Apr-2008  mjf Sync with HEAD.
 1.3.8.1 01-Mar-2008  mjf file kobj_machdep.c was added on branch mjf-devfs2 on 2008-04-03 12:42:17 +0000
 1.3.6.2 24-Mar-2008  keiichi sync with head.
 1.3.6.1 01-Mar-2008  keiichi file kobj_machdep.c was added on branch keiichi-mipv6 on 2008-03-24 07:14:58 +0000
 1.3.4.2 23-Mar-2008  matt sync with HEAD
 1.3.4.1 01-Mar-2008  matt file kobj_machdep.c was added on branch matt-armv6 on 2008-03-23 02:04:05 +0000
 1.3.2.2 17-Mar-2008  yamt sync with head.
 1.3.2.1 01-Mar-2008  yamt file kobj_machdep.c was added on branch yamt-lazymbuf on 2008-03-17 09:14:20 +0000
 1.4.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.16.1 18-Feb-2012  mrg merge to -current.
 1.5.12.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.12.1 17-Apr-2012  yamt sync with head
 1.7.10.2 18-May-2014  rmind sync with head
 1.7.10.1 28-Aug-2013  rmind sync with head
 1.7.6.2 03-Dec-2017  jdolecek update from HEAD
 1.7.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29 19-May-2022  skrll port-hppa/56837: RAS support is slightly incorrect within hppa kernel, too

While there isn't a bug here (the tf_iioq_tail handling is correct) apply
the change to make the conditional / ras symbols consistent with hppa_ras
 1.28 20-Mar-2022  andvar s/circut/circuit/ and s/circiut/circuit/ in comments and acronyms file.
 1.27 15-Apr-2019  skrll Trailing whitespace
 1.26 03-Apr-2012  skrll branches: 1.26.40;
Use GET_CURLWP
 1.25 03-Apr-2012  skrll Comments.
 1.24 03-Apr-2012  skrll Re-arrange to deal with LOCKDEBUG/MULTIPROCESSOR properly.
 1.23 03-Apr-2012  skrll Remove unnecessary #includes.
 1.22 30-Jan-2011  skrll branches: 1.22.4; 1.22.8;
Grammar.
 1.21 30-Jan-2011  skrll Tweak a comment. Suggestion from rmind@.
 1.20 30-Jan-2011  skrll Don't use magic constant.
 1.19 30-Jan-2011  skrll Whitespace.
 1.18 22-Jan-2011  skrll First attempt at MP _lock_cas.
 1.17 20-Jan-2011  skrll Remove trailing whitespace.
 1.16 20-Jan-2011  skrll Another comment tweak
 1.15 20-Jan-2011  skrll Tweak comment.
 1.14 30-Apr-2009  skrll branches: 1.14.4; 1.14.6; 1.14.8;
Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.13 28-Apr-2008  martin branches: 1.13.8; 1.13.14;
Remove clause 3 and 4 from TNF licenses
 1.12 10-Feb-2008  ad branches: 1.12.6; 1.12.8; 1.12.10;
Add aliases for atomic_cas_foo_ni().
 1.11 22-Dec-2007  skrll Minor change to comment.
 1.10 29-Nov-2007  ad branches: 1.10.2; 1.10.6;
- Change lock_cas from "compare and set" to "compare and swap".
- Add aliases for atomic_cas_ulong(), etc.

Ok skrll@
 1.9 17-Oct-2007  garbled branches: 1.9.2;
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.8 10-Sep-2007  skrll Merge nick-csl-alignment.
 1.7 12-Jul-2007  skrll branches: 1.7.4; 1.7.8; 1.7.10;
Finish up the _lock_cas implementation by adding the RAS check.

While I'm here make sure the owner gets set for mutex_enter if we get
interrupted between obtaining the interlock and setting the owner.
 1.6 20-Feb-2007  skrll branches: 1.6.2; 1.6.6; 1.6.14;
Check the right register for the mtx_waiters value.
 1.5 19-Feb-2007  skrll Call mutex_wakeup if there are waiters instead of mutex_vector_exit.
 1.4 19-Feb-2007  skrll Remove some redundant '.import's
 1.3 10-Feb-2007  skrll branches: 1.3.2;
Fix a label.
 1.2 09-Feb-2007  ad Merge newlock2 to head.
 1.1 06-Feb-2007  skrll branches: 1.1.2;
file lock_stubs.S was initially added on branch newlock2.
 1.1.2.3 07-Feb-2007  skrll Don't use the same label name twice.
 1.1.2.2 06-Feb-2007  skrll grr, match up #endifs and #ifndefs
 1.1.2.1 06-Feb-2007  skrll First pass at lock stubs for hppa. They don't work yet.
 1.3.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.6.14.1 03-Oct-2007  garbled Sync with HEAD
 1.6.6.3 03-Dec-2007  ad Sync with HEAD.
 1.6.6.2 09-Oct-2007  ad Sync with head.
 1.6.6.1 15-Jul-2007  ad Sync with head.
 1.6.2.7 11-Feb-2008  yamt sync with head.
 1.6.2.6 21-Jan-2008  yamt sync with head
 1.6.2.5 07-Dec-2007  yamt sync with head
 1.6.2.4 27-Oct-2007  yamt sync with head.
 1.6.2.3 03-Sep-2007  yamt sync with head.
 1.6.2.2 26-Feb-2007  yamt sync with head.
 1.6.2.1 20-Feb-2007  yamt file lock_stubs.S was added on branch yamt-lazymbuf on 2007-02-26 09:06:42 +0000
 1.7.10.3 23-Mar-2008  matt sync with HEAD
 1.7.10.2 09-Jan-2008  matt sync with HEAD
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.7.8.2 03-Dec-2007  joerg Sync with HEAD.
 1.7.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.7.4.2 15-Aug-2007  skrll Use HPPA_LDCW_ALIGN instead of magic constant.
 1.7.4.1 18-Jul-2007  skrll Get the aligned word of the mtx_lock in mutex_enter/mutex_exit.
 1.9.2.3 18-Feb-2008  mjf Sync with HEAD.
 1.9.2.2 27-Dec-2007  mjf Sync with HEAD.
 1.9.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.10.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.10.2.1 26-Dec-2007  ad Sync with head.
 1.12.10.2 04-May-2009  yamt sync with head.
 1.12.10.1 16-May-2008  yamt sync with head.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.8.1 27-Oct-2008  skrll Commit work in progress.
 1.14.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.14.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.14.4.1 05-Mar-2011  rmind sync with head
 1.22.8.1 05-Apr-2012  mrg sync to latest -current.
 1.22.4.1 17-Apr-2012  yamt sync with head
 1.26.40.1 10-Jun-2019  christos Sync with HEAD
 1.7 03-Apr-2025  skrll Fix qemu-system-hppa -kernel netbsd for newer qemu and seabios version 16
which passes in the 5th argument the kernel start address. Use this to
detect this boot method and not assume it's bootapi version 3.

While I'm here don't bother storing the pdc entry point as it's not used
before pdc_init which gets it from PAGE0.
 1.6 28-Oct-2021  christos branches: 1.6.4; 1.6.10;
put back the compat signal code; still have the stubs for it in libc
 1.5 27-Oct-2021  christos @thorpej wrote that sigcontext was never used on hppa; remove kernel handling
signal code. discussed also with @skrll
 1.4 08-Jan-2020  skrll oldlwp is always non-NULL in cpu_switchto so remove the test for NULL.
 1.3 16-Apr-2019  skrll branches: 1.3.6;
If arg3 is zero then fill it with the value of 'end'. Helps booting
with qemu.
 1.2 15-Apr-2019  skrll Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file locore.S was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file locore.S was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file locore.S was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3.6.1 17-Jan-2020  ad Sync with head.
 1.6.10.1 02-Aug-2025  perseant Sync with HEAD
 1.6.4.1 09-May-2025  martin Pull up following revision(s) (requested by skrll in ticket #1103):

sys/arch/hppa/hppa/locore.S: revision 1.7

Fix qemu-system-hppa -kernel netbsd for newer qemu and seabios version 16
which passes in the 5th argument the kernel start address. Use this to
detect this boot method and not assume it's bootapi version 3.

While I'm here don't bother storing the pdc entry point as it's not used
before pdc_init which gets it from PAGE0.
 1.22 16-Mar-2025  riastradh Clear trapframe on exec.

Do this for all architectures, even if the trapframe is fully
initialized -- makes it easier to audit and be confident it's
correct, and most likely (with the exception of sh3 which has an
intermediate call to ufetch_int in the middle) the compiler can
eliminate redundant stores in these routines.

PR kern/59084: exec/spawn leaks register content
 1.21 17-Apr-2024  macallan branches: 1.21.2;
turn LEDs off when shutting down
 1.20 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.19 22-Jan-2024  skrll Don't duplicate PIM_CPU_BITS in one printf.

PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS
 1.18 29-Sep-2022  skrll branches: 1.18.4;
Remove unnecessary include of <sys/malloc.h>.
 1.17 14-May-2022  skrll Add some special NOPs to help qemu.

thanks to Helge Deller for the heads-up.
 1.16 14-Sep-2020  skrll -Wno-error=array-bounds (missed from previous commit)
 1.15 08-Sep-2020  skrll KNF
 1.14 11-Jun-2020  ad uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.
 1.13 15-Apr-2020  skrll Convert PMAPDEBUG to UVMHIST
 1.12 31-Dec-2019  ad branches: 1.12.6;
Rename uvm_free() -> uvm_availmem().
 1.11 21-Dec-2019  ad uvmexp.free -> uvm_free()
 1.10 06-Apr-2019  thorpej branches: 1.10.4;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

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

Welcome to NetBSD 8.99.37.
 1.9 14-Nov-2018  skrll Some fixes for QEMU/hppa.

Don't call desidhash_l on pcxl2 as it doesn't support it. QEMU emulates
this cpu and would trap on illegal instruction for the diag in desidhash_l

Allow a FPU to be missing... more fixes are likely here.

QEMU doesn't set C bit properly yet
 1.8 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.7 02-Apr-2017  skrll branches: 1.7.4; 1.7.6; 1.7.12; 1.7.14;
PR/52129: NetBSD/hppa 7.1 fails to boot on 712/60

Add 712/* models to cpu_model_cpuid
 1.6 18-Oct-2015  maxv branches: 1.6.2; 1.6.4;
Add some {} when the meaning is too ambiguous. From Brainy.
 1.5 11-Jul-2015  kamil Improve spelling: regsiter -> register

This change is non-functional.

Approved by <riastradh>, <pgoyette>
 1.4 18-Apr-2014  martin branches: 1.4.2; 1.4.4; 1.4.6; 1.4.8; 1.4.10;
Explicitly clear p_md.md_flags for newer binaries. Fixes PR port-hppa/48755.
OK: skrll
 1.3 24-Mar-2014  christos branches: 1.3.2;
use cpu_{g,s}etmodel
 1.2 06-Mar-2014  skrll Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.3.2.1 10-Aug-2014  tls Rebase.
 1.4.10.3 28-Aug-2017  skrll Sync with HEAD
 1.4.10.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.4.10.1 22-Sep-2015  skrll Sync with HEAD
 1.4.8.3 03-Dec-2017  jdolecek update from HEAD
 1.4.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.1 18-Apr-2014  tls file machdep.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.4.6.1 20-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1396):
sys/arch/hppa/hppa/machdep.c: revision 1.7
PR/52129: NetBSD/hppa 7.1 fails to boot on 712/60
Add 712/* models to cpu_model_cpuid
 1.4.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.4.1 18-Apr-2014  yamt file machdep.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.4.2.2 18-May-2014  rmind sync with head
 1.4.2.1 18-Apr-2014  rmind file machdep.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.6.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.6.2.1 20-Jul-2016  pgoyette Adapt the machine/arch dependent code to the new {b,c}devsw reference
counting.

XXX Most of these will require testing by someone other than myself, as
I have a limited selection of hardware!
 1.7.14.3 21-Apr-2020  martin Sync with HEAD
 1.7.14.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7.14.1 10-Jun-2019  christos Sync with HEAD
 1.7.12.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.7.12.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.7.6.1 26-Apr-2019  martin Pull up following revision(s) (requested by skrll in ticket #1248):

sys/arch/hppa/hppa/machdep.c: revision 1.9
sys/arch/hppa/hppa/fpu.c: revision 1.25

Some fixes for QEMU/hppa.

Don't call desidhash_l on pcxl2 as it doesn't support it. QEMU emulates
this cpu and would trap on illegal instruction for the diag in desidhash_l

Allow a FPU to be missing... more fixes are likely here.

QEMU doesn't set C bit properly yet
 1.7.4.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.10.4.1 14-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1448):

sys/arch/hppa/hppa/idle_machdep.c: revision 1.4
sys/arch/hppa/hppa/machdep.c: revision 1.17

Add some special NOPs to help qemu.
thanks to Helge Deller for the heads-up.
 1.12.6.1 20-Apr-2020  bouyer Sync with HEAD
 1.18.4.1 03-Feb-2024  martin Pull up following revision(s) (requested by skrll in ticket #568):

sys/arch/hppa/hppa/machdep.c: revision 1.19

Don't duplicate PIM_CPU_BITS in one printf.
PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS
 1.21.2.1 02-Aug-2025  perseant Sync with HEAD
 1.19 14-Sep-2020  skrll -Wno-error=array-bounds
 1.18 15-Apr-2019  skrll Trailing whitespace
 1.17 06-Mar-2014  skrll branches: 1.17.30;
Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.16 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.15 23-Jan-2011  skrll branches: 1.15.4; 1.15.14; 1.15.18;
Detect and spin up non-boot CPUs.

Mostly from OpenBSD.
 1.14 23-Jan-2011  skrll Make some more information (psw/fpu_state) per cpu.
 1.13 31-Mar-2010  skrll branches: 1.13.2; 1.13.4;
Make cpl, ipending, and intr_depth per CPU values.
 1.12 11-Aug-2009  matt branches: 1.12.2; 1.12.4;
Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
 1.11 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.10 28-Apr-2008  martin branches: 1.10.8; 1.10.14;
Remove clause 3 and 4 from TNF licenses
 1.9 11-Dec-2005  christos branches: 1.9.74; 1.9.76; 1.9.78;
merge ktrace-lwp.
 1.8 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.7 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.6 28-Nov-2003  chs de-__P, remove register, ansify.
 1.5 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.4 25-Aug-2002  fredette branches: 1.4.6;
No longer use BTLB entries to map the entire address spaces of I/O subsystems,
since BTLB entries can be scarce and very little of an I/O subsystem normally
needs to be mapped.

Instead, the pmap now allows mappings of I/O space to be entered with
pmap_kenter_pa. bus_space mappings for small amounts of I/O space (as for
virtually all devices) are made this way, with BTLB entries still used for
large mappings for things like framebuffers.

This has led to more and cleaned-up uses of bus_space(9) and has caused
some autoconf cleanup. Also, kgdb is now attached and connected before
autoconfiguration, which is much earlier than before.
 1.3 19-Aug-2002  fredette Cleaned up BTLB support. There are no longer BTLB function pointers
in struct hppa_cpu_info or anywhere else, now there are just hppa_btlb_*
functions. Added support for machines with split I/D and variable-range
BTLBs. Added support for purging BTLB entries.
 1.2 05-Aug-2002  fredette Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file machdep.h was added on branch gehenna-devsw on 2002-07-14 17:47:11 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file machdep.h was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.78.4 11-Aug-2010  yamt sync with head.
 1.9.78.3 19-Aug-2009  yamt sync with head.
 1.9.78.2 04-May-2009  yamt sync with head.
 1.9.78.1 16-May-2008  yamt sync with head.
 1.9.76.1 18-May-2008  yamt sync with head.
 1.9.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.8.2 30-Oct-2008  skrll Fix up memory counts and reporting.
 1.10.8.1 27-Oct-2008  skrll Commit work in progress.
 1.12.4.2 05-Mar-2011  rmind sync with head
 1.12.4.1 30-May-2010  rmind sync with head
 1.12.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.13.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.18.1 18-May-2014  rmind sync with head
 1.15.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.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.17.30.1 10-Jun-2019  christos Sync with HEAD
 1.13 28-Jan-2024  macallan add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.12 18-Jan-2024  macallan rearrange things so we:
- find machine_ledaddr on Cxxx and the like without lcd at mainbus
- build without options USELEDS
 1.11 11-Oct-2022  andvar branches: 1.11.2;
fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and
s/bus_dmamem_load/bus_dmamap_load/.
Inspired by recent similar fixes in OpenBSD.
 1.10 26-Jul-2022  andvar s/functin/function/ in copy pasted comment.
 1.9 30-Mar-2022  macallan get machine_ledaddr from PDC if we find one
now USELEDS works on my c360
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 21-Nov-2020  thorpej branches: 1.6.2;
malloc(9) -> kmem(9)
 1.5 16-Oct-2020  macallan branches: 1.5.2;
support *_mmap()
 1.4 26-Apr-2019  skrll KNF
 1.3 15-Apr-2019  skrll Trailing whitespace
 1.2 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file mainbus.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file mainbus.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file mainbus.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.5.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.6.2.3 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.6.2.2 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.6.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.11.2.1 17-Feb-2024  martin Pull up following revision(s) (requested by macallan in ticket #592):

sys/arch/hppa/hppa/mainbus.c: revision 1.13
sys/arch/hppa/dev/elroy.c: revision 1.7
sys/arch/hppa/dev/dino.c: revision 1.17
sys/arch/hppa/include/bus_funcs.h: revision 1.2
sys/arch/hppa/include/bus_defs.h: revision 1.3

add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.3 22-Jan-2024  skrll Fix one by one bugs I committed back in 2009. Spotted by rillig@.
 1.2 15-Apr-2019  skrll branches: 1.2.30;
Trailing whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file pim.h was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file pim.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file pim.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.30.1 03-Feb-2024  martin Pull up following revision(s) (requested by skrll in ticket #567):

sys/arch/hppa/hppa/pim.h: revision 1.3

Fix one by one bugs I committed back in 2009. Spotted by rillig@.
 1.122 02-Aug-2023  macallan check for empty ranges in pmap_page_physload() itself
 1.121 02-Aug-2023  macallan avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again
 1.120 16-Jun-2022  skrll Re-reading the PA2.0 Cache Move-In rules tells me we do indeed need to
purge the translations from the TLBs in pmap_procwr.

PR/56867: hppa: intermittent SIGSEGV reports in t_ptrace_wait's stepN and setstepN test cases
 1.119 09-Jun-2022  skrll Oops... revert commit mistake
 1.118 09-Jun-2022  skrll Handle 'NA' (non-access) traps for the lpa and probe instructions. The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current
 1.117 26-May-2022  skrll port-hppa/56849: Wacko kernel memory accounting in current/hppa

Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove
 1.116 09-Apr-2022  riastradh sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.
 1.115 12-Mar-2022  riastradh sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

Thread A Thread B
obj->foo = 42; obj->baz = 73;
mumble(&obj->bar); grumble(&obj->quux);
/* membar_exit(); */ /* membar_exit(); */
atomic_dec -- not last atomic_dec -- last
/* membar_enter(); */
KASSERT(invariant(obj->foo,
obj->bar));
free_stuff(obj);

The memory barriers ensure that

obj->foo = 42;
mumble(&obj->bar);

in thread A happens before

KASSERT(invariant(obj->foo, obj->bar));
free_stuff(obj);

in thread B. Without them, this ordering is not guaranteed.

So in general it is necessary to do

membar_exit();
if (atomic_dec_uint_nv(&obj->refcnt) != 0)
return;
membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting. (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these. Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that. It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.
 1.114 19-Aug-2020  simonb Remove trailing \n from UVMHIST_LOG() format strings.
 1.113 25-May-2020  ad - Alter the convention for uvm_page_array slightly, so the basic search
parameters can't change part way through a search: move the "uobj" and
"flags" arguments over to uvm_page_array_init() and store those with the
array.

- With that, detect when it's not possible to find any more pages in the
tree with the given search parameters, and avoid repeated tree lookups if
the caller loops over uvm_page_array_fill_and_peek().
 1.112 30-Apr-2020  skrll Convert pmap_check_alias into a function that resolves any aliases issues
to deal with the locking around entering a mapping of the same page with
and alias issue in the same pmap (pmap lock already held in pmap_enter)

This has the added benefit of only flushing the troublesome mappings.

The locking could be simplified further here and an PV list iterator
function with callback is probably useful.
 1.111 16-Apr-2020  skrll To allow concurrent page faults on the same set of pages lock the PV
lists. From ad@ and fixed up by me.

Remove __HAVE_UNLOCKED_PMAP
 1.110 16-Apr-2020  skrll More KNF
 1.109 15-Apr-2020  skrll Convert PMAPDEBUG to UVMHIST
 1.108 15-Apr-2020  skrll Spaces to tabs
 1.107 15-Apr-2020  skrll KNF
 1.106 15-Apr-2020  skrll G/C a #include
 1.105 01-Mar-2020  ad branches: 1.105.4;
Give pmap uvm_objects an empty pagerops to avoid special casing in UVM.
(This use of uvm_object causes a disproportionate amount of work.)
 1.104 24-Feb-2020  ad Adjust for UVM locking changes.
 1.103 23-Feb-2020  ad UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart. v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap. Others to follow later.
 1.102 31-Dec-2019  ad branches: 1.102.2;
Rename uvm_page_locked_p() -> uvm_page_owner_locked_p()
 1.101 15-Dec-2019  ad Merge from yamt-pagecache:

- do gang lookup of pages using radixtree.
- remove now unused uvm_object::uo_memq and vm_page::listq.queue.
 1.100 22-Dec-2016  cherry branches: 1.100.16; 1.100.20;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.
 1.99 08-Aug-2014  skrll branches: 1.99.4; 1.99.8;
Trailing whitespace.
 1.98 28-Feb-2012  skrll branches: 1.98.2; 1.98.12;
Fix PMAPDEBUG build
 1.97 06-Jan-2012  skrll branches: 1.97.2;
Track if a page has an executable mapping and flush the icache (and
dcache) appropriately.

Fixes the lang/python26 build on my C3700 (PA8700) and chuq's J6700 with
PA8500.

Thanks to chuq for ideas and help with this.
 1.96 06-Jan-2012  skrll Wrap a long line.
 1.95 06-Jan-2012  skrll Add a KASSERT.
 1.94 06-Jan-2012  skrll More whitespace.
 1.93 06-Jan-2012  skrll Whitespace. hi perry.
 1.92 06-Jan-2012  skrll Group the prototypes.
 1.91 06-Jan-2012  skrll Simplify code a little.
 1.90 06-Jan-2012  skrll Style.
 1.89 06-Jan-2012  skrll Make pmap_check_alias static
 1.88 30-Dec-2011  skrll G/C pmap_page_remove_locked prototype.
 1.87 30-Dec-2011  skrll Cope with userland mappings of unmanaged pages (i.e. device memory being
mmap'ed), by properly making these mappings uncached, and correctly accounting
their removal to not get stuck with leftover pte pages.

From OpenBSD.
 1.86 29-Dec-2011  skrll No need for sync_caches - f[di]cache already issue the sync instruction.
 1.85 23-Dec-2011  skrll Whitespace.
 1.84 23-Dec-2011  skrll Define PMAP_NEED_PROCWR and provide pmap_procwr so that the i-cache is
synchronised with the d-cache appropriately.
 1.83 16-Dec-2011  skrll G/C pvh_aliases
 1.82 05-Dec-2011  skrll Whitespace.
 1.81 12-Jun-2011  rmind branches: 1.81.2; 1.81.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.80 14-Jan-2011  rmind branches: 1.80.6;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.79 14-Nov-2010  uebayasi Don't rely on global APIs from internal.
 1.78 12-Nov-2010  uebayasi Put VM_PAGE_TO_MD() definition in one place. No functional changes.
 1.77 30-Oct-2010  uebayasi Use VM_PAGE_TO_MD() to locate struct vm_page_md. No functional
changes.
 1.76 21-Jun-2010  skrll Allow PVF_UNCACHEABLE in set/clear of pmap_changebit call (for now).
 1.75 02-Apr-2010  skrll Pull across pmap_remove fix from OpenBSD.

Fix user-after-free bug in pmap_remove(). Page table pages are freed as soon
as the last page table entry that was actually used is cleared. So make sure
we check the page table page is still there for every page we remove.
Otherwise we will bring back the tlb entry and cache lines when we touch the
freed page, and we will create an illegal alias (non-equivalent mapping)
as soon as the page gets re-used.
 1.74 19-Mar-2010  skrll Fix PMAPDEBUG build for previous.
 1.73 19-Mar-2010  skrll Not all PA CPUs have the U-bit (uncacheable) for non-IO memory. In fact
most don't. Deal with non-equivalent aliases by removing and flushing the
managed mappings, and flushing the unmanaged mappings.

When flushing caches/TLB flush the cache before purging the TLB just in
case the flush enters the mapping into the TLB.
 1.72 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.71 13-Mar-2010  skrll branches: 1.71.2;
Add a comment.
 1.70 06-Mar-2010  skrll Add #include "opt_cputype.h" where necessary.
 1.69 24-Feb-2010  skrll s/printf/db_printf/ in a few places.
 1.68 22-Feb-2010  skrll Deal with PA2.0 cache move-in rules by purging the TLB as well as
flushing/purging the cache.
 1.67 17-Feb-2010  skrll Fix typo in previous. It's not a good idea to let uvm mess with kernel
text pages.
 1.66 17-Feb-2010  skrll Semi-colons help.
 1.65 17-Feb-2010  skrll Add a prototype for pmap_page_physload.
 1.64 16-Feb-2010  skrll Remove the dma24_ex method of dealing with BUS_DMA_24BIT and replace
with a uvm managed freelist of pages in the right range.
 1.63 18-Dec-2009  skrll branches: 1.63.2;
Remove unnecessary part of conditional.
 1.62 18-Dec-2009  skrll DPRINTF format fixes.
 1.61 18-Dec-2009  skrll Fix pmap_dump_table so that it doesn't loop indefinitely for a space that
doesn't map anything in the last PDE.

Also, don't loop unnecessarily through the spaces.
 1.60 28-Nov-2009  skrll Flush only as much as is required. Pointed out by rmind.
 1.59 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.58 26-Nov-2009  matt Kill proc0paddr. Use lwp0.l_addr instead.
 1.57 21-Nov-2009  rmind Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.56 14-Nov-2009  skrll Update a couple of comments.
 1.55 11-Nov-2009  skrll Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE.
 1.54 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.53 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.52 12-Aug-2009  skrll Fix non-DEBUG builds.
 1.51 12-Aug-2009  skrll Remove NOP flushes. pvh_list == NULL.
 1.50 12-Aug-2009  skrll Pull across a fix from OpenBSD, but use PDE_SIZE instead of ~PDE_MASK + 1.

Make sure that if a PDE isn't there, we skip to the start of the address
range covered by the next PDE and not somewhere in the middle. The old could
have skipped over some valid PTE's causing them to stay behind in the pmap.
Since we would not flush the cache for those pages either this could also
cause memory corruption when dirty cache lines would be written back to
memory at a later stage.
 1.49 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.48 21-Apr-2009  cegger change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
 1.47 17-Dec-2008  cegger branches: 1.47.2;
kill MALLOC and FREE macros.
 1.46 16-Dec-2008  christos replace bitmask_snprintf(9) with snprintb(3)
 1.45 10-Dec-2008  pooka Make kernel_pmap_ptr a const. Requested by steve_martin.
 1.44 09-Dec-2008  pooka Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

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

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.43 28-Apr-2008  martin branches: 1.43.6; 1.43.8;
Remove clause 3 and 4 from TNF licenses
 1.42 05-Jan-2008  ad branches: 1.42.6; 1.42.8; 1.42.10;
Fix includes
 1.41 20-Dec-2007  skrll typo in comment.
 1.40 15-Dec-2007  perry __FUNCTION__ -> __func__
 1.39 26-Nov-2007  yamt branches: 1.39.2; 1.39.6;
pmap_create: M_VMMAP -> M_VMPMAP for pmap.
 1.38 17-Oct-2007  garbled branches: 1.38.2;
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.37 12-Jul-2007  skrll branches: 1.37.8; 1.37.10;
Like I said - don't futz with the trapframe in pmap_activate. Instead
update the trapframe space and protection register in cpu_lwp_fork and
setregs.
 1.36 18-May-2007  skrll pmap_activate shouldn't play with the trap frame - especially not now it's
called by the MI code.

Implement a way of tracking the vmspace allocated to a process and its
LWPs so that if it changes underneath us we can correct the space id in
the trapframe in pmap_activate for now.

An example of when this happens is vfork/exec.

An exec hook is probably the way to go.
 1.35 04-Mar-2007  christos branches: 1.35.2; 1.35.4; 1.35.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.34 03-Mar-2007  skrll Remove hppa_{round,trunc}_page.
 1.33 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.32 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.31 19-Feb-2007  skrll Whitespace.
 1.30 24-Nov-2006  wiz branches: 1.30.4;
s/independant/independent/, from Zafer.
 1.29 30-Oct-2006  skrll pmap_kenter_pa the kernel and it's data structures including the kernel
stack.

Fixes the "booting from disk memory corruption bug" which was a result
of pmap_extract silently failing against a scsipi_xfer data area allocat-
ed on kernel stack in _bus_dmamap_load_buffer
 1.28 30-Oct-2006  skrll Add some debug code.
 1.27 30-Oct-2006  skrll Whitespace fixes.
 1.26 30-Oct-2006  skrll G/C pages_per_vm_page
 1.25 23-Oct-2006  skrll KNF and comment update.
 1.24 03-Sep-2006  skrll branches: 1.24.2; 1.24.4;
Don't lose a page at the end of the 3 segments we uvm_page_physload.
(end/avail_end are excluive page numbers - as dicussed on tech-kern)
 1.23 25-Aug-2006  skrll Fix PR 33702.

Modernise the linker script and make sure we have a symbol after the
link_sets.

Make sure that pmap_bootstrap doesn't tell uvm that some of the kernel
phys pages are free. Previously uvm would very likely allocate the phys
pages used for the link_sets to a MALLOC and they'd get overwritten.

Thanks to David H. Gutteridge for testing various things.
 1.22 25-Aug-2006  skrll KNF a comment
 1.21 24-Aug-2006  skrll Use PMAP_PRINTF(PDB_INIT, ...) instead of various #ifdefs and add some
more debug code.
 1.20 24-Aug-2006  skrll KNF a comment.
 1.19 24-Aug-2006  skrll Fix PMAPDEBUG compile by sorting the printf format problems.
 1.18 24-Dec-2005  perry branches: 1.18.4; 1.18.8; 1.18.18;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.17 11-Dec-2005  christos merge ktrace-lwp.
 1.16 29-May-2005  chs branches: 1.16.2;
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.15 07-May-2005  chs in pmap_protect(), remove the assertion that any entries modified must be
managed. after the yamt-km changes, the sti driver needs to add execute
permission to the (now unmanaged) mapping for its copy of the card firmware,
and this appears to work fine already.
 1.14 18-Jul-2004  chs branches: 1.14.10;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.13 16-May-2004  chs in pmap_protect(), don't just return if the desired permissions include write.
we could be removing execute permission.
 1.12 05-Jan-2004  chs branches: 1.12.2; 1.12.4;
add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
 1.11 28-Nov-2003  chs de-__P, remove register, ansify.
 1.10 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 10-May-2003  thorpej branches: 1.8.2;
Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

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

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

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

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

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.6 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.5 25-Aug-2002  fredette No longer use BTLB entries to map the entire address spaces of I/O subsystems,
since BTLB entries can be scarce and very little of an I/O subsystem normally
needs to be mapped.

Instead, the pmap now allows mappings of I/O space to be entered with
pmap_kenter_pa. bus_space mappings for small amounts of I/O space (as for
virtually all devices) are made this way, with BTLB entries still used for
large mappings for things like framebuffers.

This has led to more and cleaned-up uses of bus_space(9) and has caused
some autoconf cleanup. Also, kgdb is now attached and connected before
autoconfiguration, which is much earlier than before.
 1.4 19-Aug-2002  fredette Cleaned up BTLB support. There are no longer BTLB function pointers
in struct hppa_cpu_info or anywhere else, now there are just hppa_btlb_*
functions. Added support for machines with split I/D and variable-range
BTLBs. Added support for purging BTLB entries.
 1.3 11-Aug-2002  fredette Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache. If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
 1.2 05-Aug-2002  fredette Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file pmap.c was added on branch gehenna-devsw on 2002-07-14 17:47:12 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file pmap.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.8.2.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.4.1 08-Jun-2005  tron Pull up revision 1.16 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.12.2.1 08-Jun-2005  tron Pull up revision 1.16 (requested by chs in ticket #1980):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.14.10.1 06-Jun-2005  tron Pull up revision 1.16 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
 1.16.2.6 21-Jan-2008  yamt sync with head
 1.16.2.5 07-Dec-2007  yamt sync with head
 1.16.2.4 03-Sep-2007  yamt sync with head.
 1.16.2.3 26-Feb-2007  yamt sync with head.
 1.16.2.2 30-Dec-2006  yamt sync with head.
 1.16.2.1 21-Jun-2006  yamt sync with head.
 1.18.18.1 07-Sep-2006  riz Pull up following revision(s) (requested by skrll in ticket #116):
sys/arch/hppa/hppa/pmap.c: revision 1.19
sys/arch/hppa/hppa/pmap.c: revision 1.20
sys/arch/hppa/hppa/pmap.c: revision 1.21
sys/arch/hppa/hppa/pmap.c: revision 1.22
sys/arch/hppa/hppa/pmap.c: revision 1.23
sys/arch/hppa/hppa/pmap.c: revision 1.24
sys/arch/hp700/conf/ld.script: revision 1.9
Fix PMAPDEBUG compile by sorting the printf format problems.
KNF a comment.
Use PMAP_PRINTF(PDB_INIT, ...) instead of various #ifdefs and add some
more debug code.
KNF a comment
Fix PR 33702.
Modernise the linker script and make sure we have a symbol after the
link_sets.
Make sure that pmap_bootstrap doesn't tell uvm that some of the kernel
phys pages are free. Previously uvm would very likely allocate the phys
pages used for the link_sets to a MALLOC and they'd get overwritten.
Thanks to David H. Gutteridge for testing various things.
Don't lose a page at the end of the 3 segments we uvm_page_physload.
(end/avail_end are excluive page numbers - as dicussed on tech-kern)
 1.18.8.2 14-Sep-2006  yamt sync with head.
 1.18.8.1 03-Sep-2006  yamt sync with head.
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.24.4.1 10-Dec-2006  yamt sync with head.
 1.24.2.2 12-Jan-2007  ad Sync with head.
 1.24.2.1 18-Nov-2006  ad Sync with head.
 1.30.4.2 12-Mar-2007  rmind Sync with HEAD.
 1.30.4.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.35.10.2 03-Oct-2007  garbled Sync with HEAD
 1.35.10.1 22-May-2007  matt Update to HEAD.
 1.35.4.1 11-Jul-2007  mjf Sync with head.
 1.35.2.3 03-Dec-2007  ad Sync with HEAD.
 1.35.2.2 15-Jul-2007  ad Sync with head.
 1.35.2.1 27-May-2007  ad Sync with head.
 1.37.10.2 09-Jan-2008  matt sync with HEAD
 1.37.10.1 06-Nov-2007  matt sync with HEAD
 1.37.8.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.38.2.3 18-Feb-2008  mjf Sync with HEAD.
 1.38.2.2 27-Dec-2007  mjf Sync with HEAD.
 1.38.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.39.6.2 08-Jan-2008  bouyer Sync with HEAD
 1.39.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.39.2.1 26-Dec-2007  ad Sync with head.
 1.42.10.5 11-Aug-2010  yamt sync with head.
 1.42.10.4 11-Mar-2010  yamt sync with head
 1.42.10.3 19-Aug-2009  yamt sync with head.
 1.42.10.2 04-May-2009  yamt sync with head.
 1.42.10.1 16-May-2008  yamt sync with head.
 1.42.8.1 18-May-2008  yamt sync with head.
 1.42.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.42.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.43.8.58 28-Apr-2009  skrll Track unmanaged mappings to deal with loaning and non-equivalient aliases.
 1.43.8.57 28-Apr-2009  skrll Sync with HEAD.
 1.43.8.56 27-Apr-2009  skrll For correctness test pvh_attrs with lock held.
 1.43.8.55 27-Apr-2009  skrll Enable a DPRINT
 1.43.8.54 27-Apr-2009  skrll Oops, typo in previous.
 1.43.8.53 27-Apr-2009  skrll Another comment update.
 1.43.8.52 27-Apr-2009  skrll Update some comments.
 1.43.8.51 27-Apr-2009  skrll Add a reference.
 1.43.8.50 25-Apr-2009  skrll Whitespace.
 1.43.8.49 25-Apr-2009  skrll Add a KASSERT to pmap_activate
 1.43.8.48 25-Apr-2009  skrll Wrap long lines. KNF.
 1.43.8.47 25-Apr-2009  skrll Put KASSERTs after DPRINTFs.
 1.43.8.46 21-Apr-2009  skrll Remove incorrect KASSERT.

XXX PVF_KENTER needs work.
 1.43.8.45 10-Apr-2009  skrll Remove PMAPDEBUG define that crept in.
 1.43.8.44 03-Apr-2009  skrll Track referrenced and modified attributes of pages correct, i.e. as
described in pmap(9).

Inherit uncacheable attribute if the page already has non-equiv aliases.

Tidy-up a comment while I'm here.
 1.43.8.43 28-Mar-2009  skrll Use __func__ everywhere.

Fix-up a message while here.
 1.43.8.42 28-Mar-2009  skrll Whitespace.
 1.43.8.41 27-Mar-2009  skrll Simplify locking while UP only.
 1.43.8.40 27-Mar-2009  skrll Make pmap_hptdump compile.
 1.43.8.39 21-Mar-2009  skrll No need to apply PTE_PAGE to pa. It's already page aligned.
 1.43.8.38 14-Mar-2009  skrll Add a comment.
 1.43.8.37 14-Mar-2009  skrll Remove redundant part of a KASSERT
 1.43.8.36 13-Mar-2009  skrll Remove some debug code.
 1.43.8.35 13-Mar-2009  skrll Wrap a line. KNF.
 1.43.8.34 13-Mar-2009  skrll Add a couple of KASSERTs.
 1.43.8.33 08-Mar-2009  skrll bcopy -> memcpy
 1.43.8.32 01-Mar-2009  skrll Fix previous - I forgot a ;
 1.43.8.31 01-Mar-2009  skrll More DIAGNOSTIC changed to KASSERT.
 1.43.8.30 25-Feb-2009  skrll s/u_int32_t/uint32_t/
 1.43.8.29 24-Feb-2009  skrll Re-enable hp700_pagezero_{,un}map
 1.43.8.28 24-Feb-2009  skrll Fix non-DIAGNOSTIC compiles.
 1.43.8.27 23-Feb-2009  skrll Remove debug code so that a kernel compiles with clean sources from the
branch.
 1.43.8.26 19-Feb-2009  skrll Fixup redzone stuff and enable it if DIAGNOSTIC.
 1.43.8.25 11-Feb-2009  skrll Handle non-equivalent aliases.

Thanks to mjf for help with this.
 1.43.8.24 08-Feb-2009  skrll Whitespace.
 1.43.8.23 03-Feb-2009  skrll Make LOCKDEBUG kernels boot.
 1.43.8.22 29-Jan-2009  skrll Rename a variable to better reflect what it's used for.
 1.43.8.21 25-Jan-2009  skrll Convert some #ifdef PMAPDEBUG checks to KASSERTs.
 1.43.8.20 19-Jan-2009  skrll Sync with HEAD.
 1.43.8.19 18-Jan-2009  skrll Update a comment to make sense to >1 person.
 1.43.8.18 18-Jan-2009  skrll It's VM_PAGE_TO_PHYS you muppet.
 1.43.8.17 18-Jan-2009  skrll Before returning a page to UVM flush the cache to avoid aliasing problems.
 1.43.8.16 18-Jan-2009  skrll Convert pmap_flush_page's 2nd arg from int to bool.
 1.43.8.15 18-Jan-2009  skrll G/C #if 0 code
 1.43.8.14 18-Jan-2009  skrll Typo.
 1.43.8.13 15-Dec-2008  skrll No need for pmap_bootstrap_pv_page* with PMAP_{,UN}MAP_POOLPAGE.
 1.43.8.12 04-Dec-2008  skrll Improve debug output.
 1.43.8.11 04-Dec-2008  skrll Improve locking.
 1.43.8.10 04-Dec-2008  skrll Whitespace.
 1.43.8.9 22-Nov-2008  mjf Bah! Fix my previous commit that broke the build. I should have converted
the cast I just removed to uint32_t.
 1.43.8.8 22-Nov-2008  mjf Don't cast 'pve->pv_va' to int, seeing as its type is vaddr_t (uint32_t).
 1.43.8.7 17-Nov-2008  skrll Restore PMAP_NC
 1.43.8.6 17-Nov-2008  skrll Typo in comment.
 1.43.8.5 10-Nov-2008  skrll Improve BTLB handing.
 1.43.8.4 09-Nov-2008  skrll G/C some old stuff.
 1.43.8.3 01-Nov-2008  skrll Pre-allocate pdes for all of KVA.

Correctly pmap_kenter_pa the various memory areas.
 1.43.8.2 30-Oct-2008  skrll Fix up memory counts and reporting.
 1.43.8.1 27-Oct-2008  skrll Commit work in progress.
 1.43.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.47.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.63.2.10 06-Nov-2010  uebayasi Sync with HEAD.
 1.63.2.9 31-Oct-2010  uebayasi We already have a flag PMAP_NOCACHE. s/PMAP_UNMANAGED/PMAN_NOCACHE/.
Pointed out by Chuck Silvers, thanks.
 1.63.2.8 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.63.2.7 17-Aug-2010  uebayasi Sync with HEAD.
 1.63.2.6 07-Jul-2010  uebayasi Clean up; merge options DIRECT_PAGE into options XIP.
 1.63.2.5 31-May-2010  uebayasi Re-define the definition of "device page"; device pages are pages of
device memory. Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.
 1.63.2.4 28-May-2010  uebayasi Fix a typo; pointed out by Chuck Silvers.
 1.63.2.3 30-Apr-2010  uebayasi Sync with HEAD.
 1.63.2.2 27-Apr-2010  uebayasi Support PMAP_UNMANAGED in some pmaps.

(Others should be converted eventually, but no problem while managed
device page is not used.)
 1.63.2.1 25-Feb-2010  uebayasi Use VM_PAGE_TO_MD(). Only compile tested.
 1.71.2.6 19-May-2011  rmind Implement sharing of vnode_t::v_interlock amongst vnodes:
- Lock is shared amongst UVM objects using uvm_obj_setlock() or getnewvnode().
- Adjust vnode cache to handle unsharing, add VI_LOCKSHARE flag for that.
- Use sharing in tmpfs and layerfs for underlying object.
- Simplify locking in ubc_fault().
- Sprinkle some asserts.

Discussed with ad@.
 1.71.2.5 09-Mar-2011  skrll Drop per-page locking i.e. pvh_lock and rely on locking provided by
upper layer, UVM. Sprinkle asserts.
 1.71.2.4 05-Mar-2011  rmind sync with head
 1.71.2.3 03-Jul-2010  rmind sync with head
 1.71.2.2 30-May-2010  rmind sync with head
 1.71.2.1 16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.80.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.81.6.4 06-Mar-2012  mrg sync to -current
 1.81.6.3 06-Mar-2012  mrg sync to -current
 1.81.6.2 04-Mar-2012  mrg sync to latest -current.
 1.81.6.1 18-Feb-2012  mrg merge to -current.
 1.81.2.2 17-Apr-2012  yamt sync with head
 1.81.2.1 02-Dec-2011  yamt adapt hp700. compile tested.
 1.97.2.1 02-Mar-2012  riz Pull up following revision(s) (requested by skrll in ticket #62):
sys/arch/hppa/hppa/pmap.c: revision 1.98
Fix PMAPDEBUG build
 1.98.12.1 10-Aug-2014  tls Rebase.
 1.98.2.2 03-Dec-2017  jdolecek update from HEAD
 1.98.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.99.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.99.4.1 05-Feb-2017  skrll Sync with HEAD
 1.100.20.2 16-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1474):

sys/arch/hppa/hppa/pmap.c: revision 1.120

Re-reading the PA2.0 Cache Move-In rules tells me we do indeed need to
purge the translations from the TLBs in pmap_procwr.

PR/56867: hppa: intermittent SIGSEGV reports in t_ptrace_wait's stepN
and setstepN test cases
 1.100.20.1 10-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1467):

sys/arch/hppa/include/pmap.h: revision 1.41
sys/arch/hppa/hppa/pmap.c: revision 1.117

port-hppa/56849: Wacko kernel memory accounting in current/hppa

Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove
 1.100.16.2 21-Apr-2020  martin Sync with HEAD
 1.100.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.102.2.1 29-Feb-2020  ad Sync with head.
 1.105.4.1 20-Apr-2020  bouyer Sync with HEAD
 1.5 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.4 11-Dec-2005  christos branches: 1.4.26; 1.4.30; 1.4.32; 1.4.38;
merge ktrace-lwp.
 1.3 10-Oct-2003  chs branches: 1.3.16;
update for new gas syntax. from Jochen Kunz.
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file proc_subr.S was added on branch gehenna-devsw on 2002-07-14 17:47:12 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file proc_subr.S was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.3.16.1 03-Sep-2007  yamt sync with head.
 1.4.38.1 22-May-2007  matt Update to HEAD.
 1.4.32.1 11-Jul-2007  mjf Sync with head.
 1.4.30.2 09-Jun-2007  ad Sync with head.
 1.4.30.1 27-May-2007  ad Sync with head.
 1.4.26.1 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.18 04-Jan-2014  dsl Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
 1.17 03-Mar-2011  skrll branches: 1.17.4; 1.17.14; 1.17.18;
Deal with cr27 in process_{read,write}_regs
 1.16 14-Jan-2011  rmind branches: 1.16.2; 1.16.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.15 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.14 21-Nov-2009  rmind branches: 1.14.2; 1.14.4;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.13 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.12 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.11 30-Apr-2009  skrll Move HPPA_SID_KERNEL into pmap.h and deal with the move.
 1.10 18-Mar-2009  cegger bcopy -> memcpy
 1.9 10-Jan-2008  skrll branches: 1.9.10; 1.9.18; 1.9.24;
Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.8 04-Mar-2007  christos branches: 1.8.20; 1.8.26; 1.8.32;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.7 11-Dec-2005  christos branches: 1.7.26;
merge ktrace-lwp.
 1.6 01-Jun-2005  scw branches: 1.6.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).
 1.5 01-May-2005  chs flush the FPU before accessing the PCB copy.
 1.4 15-Jun-2004  chs flush the dcache after accessing pcb_fpregs.
we access it with the DTLB both on and off,
so we need to avoid bad cache aliases.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file process_machdep.c was added on branch gehenna-devsw on 2002-07-14 17:47:12 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file process_machdep.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.6.2.2 21-Jan-2008  yamt sync with head
 1.6.2.1 03-Sep-2007  yamt sync with head.
 1.7.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.8.32.1 11-Jan-2008  bouyer Sync with HEAD
 1.8.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.8.20.1 23-Mar-2008  matt sync with HEAD
 1.9.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.18.2 28-Apr-2009  skrll Sync with HEAD.
 1.9.18.1 27-Oct-2008  skrll Commit work in progress.
 1.9.10.3 11-Aug-2010  yamt sync with head.
 1.9.10.2 11-Mar-2010  yamt sync with head
 1.9.10.1 04-May-2009  yamt sync with head.
 1.14.4.2 05-Mar-2011  rmind sync with head
 1.14.4.1 30-May-2010  rmind sync with head
 1.14.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.16.4.1 05-Mar-2011  bouyer Sync with HEAD
 1.16.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.18.1 18-May-2014  rmind sync with head
 1.17.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.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.4 05-Apr-2014  christos adjust to new signature; return consistent stuff. 0 is ok -1 is error
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.122; 1.3.128;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.2 06-Aug-2004  skrll Fix merge mistakes.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file procfs_machdep.c was added on branch gehenna-devsw on 2002-07-14 17:47:13 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file procfs_machdep.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.3.128.1 18-May-2014  rmind sync with head
 1.3.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.112.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.28 27-Oct-2021  thorpej Use the signal trampoline version constants from <sys/signal.h>.
 1.27 15-Apr-2019  skrll Trailing whitespace
 1.26 27-Nov-2018  maxv Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.25 08-Feb-2011  rmind branches: 1.25.30; 1.25.34; 1.25.42; 1.25.48; 1.25.54; 1.25.56;
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.24 14-Jan-2011  rmind branches: 1.24.2; 1.24.4;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.23 21-Nov-2009  rmind branches: 1.23.4;
Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.22 21-Nov-2008  he Rename sendsig() to sendsig_siginfo(), so that we don't conflict
with the newly added sendsig() in kern_sig.c.
 1.21 28-Apr-2008  martin branches: 1.21.2; 1.21.6; 1.21.8;
Remove clause 3 and 4 from TNF licenses
 1.20 24-Apr-2008  ad branches: 1.20.2;
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
 1.19 22-Dec-2007  skrll branches: 1.19.6; 1.19.8;
Align the stack when delivering signals and don't waste a HPPA_FRAME_SIZE.
 1.18 13-Dec-2007  skrll g/c __HPPA_SIGNAL_PRIVATE
 1.17 17-Oct-2007  garbled branches: 1.17.4; 1.17.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.16 08-Jul-2007  pooka branches: 1.16.10;
Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL. Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
 1.15 09-Feb-2007  ad branches: 1.15.6; 1.15.8; 1.15.14;
Merge newlock2 to head.
 1.14 11-Dec-2005  christos branches: 1.14.20;
merge ktrace-lwp.
 1.13 07-May-2005  chs branches: 1.13.2;
in sendsig(), set tf->tf_iisq_* as well, since a thread might take a signal
while it's executing in the gateway page.
 1.12 01-May-2005  chs remove the sigcontext signal stuff, we've never used it.
 1.11 24-Jul-2004  chs real siginfo support.
 1.10 18-Jul-2004  chs add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.9 11-Jun-2004  chs change sigdebug default to not print anything.
 1.8 26-Mar-2004  drochner To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
 1.7 28-Nov-2003  chs de-__P, remove register, ansify.
 1.6 26-Sep-2003  simonb Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
 1.5 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.4 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.3 15-Jul-2003  lukem __KERNEL_RCSID()
 1.2 04-Jul-2002  thorpej branches: 1.2.2; 1.2.8;
Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.
 1.1 05-Jun-2002  fredette branches: 1.1.2;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sig_machdep.c was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.2.8.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.8.2 06-Aug-2004  skrll Fix merge mistakes.
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.3 16-Jul-2002  gehenna catch up with -current.
 1.2.2.2 14-Jul-2002  gehenna catch up with -current.
 1.2.2.1 04-Jul-2002  gehenna file sig_machdep.c was added on branch gehenna-devsw on 2002-07-14 17:47:13 +0000
 1.13.2.3 21-Jan-2008  yamt sync with head
 1.13.2.2 03-Sep-2007  yamt sync with head.
 1.13.2.1 26-Feb-2007  yamt sync with head.
 1.14.20.2 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.14.20.1 29-Jan-2007  ad Make hp700 compile.
 1.15.14.1 03-Oct-2007  garbled Sync with HEAD
 1.15.8.1 11-Jul-2007  mjf Sync with head.
 1.15.6.1 15-Jul-2007  ad Sync with head.
 1.16.10.2 09-Jan-2008  matt sync with HEAD
 1.16.10.1 06-Nov-2007  matt sync with HEAD
 1.17.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.17.4.1 26-Dec-2007  ad Sync with head.
 1.19.8.1 18-May-2008  yamt sync with head.
 1.19.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.19.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.2.3 11-Mar-2010  yamt sync with head
 1.20.2.2 04-May-2009  yamt sync with head.
 1.20.2.1 16-May-2008  yamt sync with head.
 1.21.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.21.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.21.2.3 14-May-2008  wrstuden Per discussion with ad at n dot o, revert signal mask handling
changes.

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

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

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

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

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.
 1.21.2.2 14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

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

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

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

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

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.23.4.1 05-Mar-2011  rmind sync with head
 1.24.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.24.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.56.1 10-Jun-2019  christos Sync with HEAD
 1.25.54.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.25.48.1 27-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1173):
sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/riscv/riscv/sig_machdep.c: revision 1.2
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.25.42.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.25.34.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.25.30.1 30-Jan-2019  martin Pull up following revision(s) (requested by maxv in ticket #1677):

sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
sys/arch/arm/arm/sig_machdep.c: revision 1.51
sys/arch/i386/i386/machdep.c: revision 1.813
sys/arch/alpha/alpha/machdep.c: revision 1.352
sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
sys/arch/sparc64/sparc64/machdep.c: revision 1.289
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
sys/arch/mips/mips/sig_machdep.c: revision 1.24
sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.
 1.10 28-Oct-2021  christos put back the compat signal code; still have the stubs for it in libc
 1.9 27-Oct-2021  christos @thorpej wrote that sigcontext was never used on hppa; remove kernel handling
signal code. discussed also with @skrll
 1.8 15-Apr-2019  skrll Trailing whitespace
 1.7 03-Nov-2009  snj branches: 1.7.64;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.6 11-Dec-2005  christos branches: 1.6.78;
merge ktrace-lwp.
 1.5 26-Mar-2004  drochner To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
 1.4 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.3 04-Jul-2002  thorpej branches: 1.3.2; 1.3.8;
The signal trampoline runs in userspace; do not profile it.
 1.2 01-Jul-2002  fredette Made the signal trampoline PLABEL-aware.

Added a missing comma to the pmap_redzone() call.
 1.1 05-Jun-2002  fredette branches: 1.1.2;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sigcode.S was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.3.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.8.1 03-Aug-2004  skrll Sync with HEAD
 1.3.2.3 16-Jul-2002  gehenna catch up with -current.
 1.3.2.2 14-Jul-2002  gehenna catch up with -current.
 1.3.2.1 04-Jul-2002  gehenna file sigcode.S was added on branch gehenna-devsw on 2002-07-14 17:47:13 +0000
 1.6.78.1 11-Mar-2010  yamt sync with head
 1.7.64.1 10-Jun-2019  christos Sync with HEAD
 1.9 06-Sep-2025  riastradh paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs
 1.8 20-Apr-2025  skrll branches: 1.8.2;
PR59305: kernel longjmp(9) fails to make setjmp(9) return 1
 1.7 15-Apr-2019  skrll branches: 1.7.4; 1.7.30; 1.7.36;
Trailing whitespace
 1.6 03-Nov-2009  snj branches: 1.6.64;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.5 11-Dec-2005  christos branches: 1.5.78;
merge ktrace-lwp.
 1.4 26-Aug-2004  jkunz Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
 1.3 07-Aug-2004  chs clean up some register naming.
 1.2 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.4 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.3 03-Sep-2004  skrll Sync with HEAD
 1.1.10.2 12-Aug-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file support.S was added on branch gehenna-devsw on 2002-07-14 17:47:14 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file support.S was added on branch kqueue on 2002-06-23 17:37:05 +0000
 1.5.78.1 11-Mar-2010  yamt sync with head
 1.6.64.1 10-Jun-2019  christos Sync with HEAD
 1.7.36.1 02-Aug-2025  perseant Sync with HEAD
 1.7.30.2 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
common/lib/libc/arch/i386/atomic/atomic.S: revision 1.38
common/lib/libc/arch/sparc/atomic/membar_ops.S: revision 1.9
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
common/lib/libc/arch/sparc64/atomic/membar_ops.S: revision 1.10
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
common/lib/libc/arch/x86_64/atomic/atomic.S: revision 1.32
(all via patch)

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.7.30.1 09-May-2025  martin Pull up following revision(s) (requested by skrll in ticket #1104):

sys/arch/hppa/hppa/support.S: revision 1.8

PR59305: kernel longjmp(9) fails to make setjmp(9) return 1
 1.7.4.1 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
(all via patch)

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.8.2.1 19-Oct-2025  martin Pull up following revision(s) (requested by riastradh in ticket #60):

sys/arch/sparc/sparc/locore.s: revision 1.287
share/man/man9/Makefile: revision 1.475
sys/arch/mips/mips/cpu_subr.c: revision 1.65
sys/arch/riscv/riscv/cpu_subr.c: revision 1.6
sys/arch/mips/mips/cpu_subr.c: revision 1.66
sys/arch/amd64/amd64/cpufunc.S: revision 1.70
common/lib/libc/arch/i386/atomic/atomic.S: revision 1.38
common/lib/libc/arch/sparc/atomic/membar_ops.S: revision 1.9
sys/arch/hppa/hppa/support.S: revision 1.9
sys/arch/alpha/alpha/locore.s: revision 1.145
share/man/man9/paravirt_membar_sync.9: revision 1.1
sys/arch/sparc64/sparc64/locore.s: revision 1.436
distrib/sets/lists/comp/mi: revision 1.2499
sys/arch/i386/i386/cpufunc.S: revision 1.54
common/lib/libc/arch/sparc64/atomic/membar_ops.S: revision 1.10
sys/sys/paravirt_membar.h: revision 1.1
sys/arch/arm/arm/cpu_subr.c: revision 1.6
sys/arch/virt68k/virt68k/locore.s: revision 1.17
common/lib/libc/arch/x86_64/atomic/atomic.S: revision 1.32

paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs

mips: Fix asm arch options in new paravirt_membar_sync.
Need to explicitly enable mips2 (MIPS-II) instructions in order to
use sync. Fixes:
/tmp/ccxgOmXc.s: Assembler messages:
/tmp/ccxgOmXc.s:3576: Error: opcode not supported on this processor: mips1 (mips1) `sync'
--- cpu_subr.o ---
*** Failed target: cpu_subr.o

PR kern/59618: occasional virtio block device lock ups/hangs
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file sys_machdep.c was added on branch tls-maxphys on 2014-08-20 00:03:04 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file sys_machdep.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file sys_machdep.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.75 23-Jul-2023  skrll PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN

Provide syscall_intern and use the md_syscall in syscall trap handling.
 1.74 06-Sep-2021  andvar fix various typos in comments.
 1.73 14-Sep-2020  skrll -Wno-error=array-bounds
 1.72 16-Apr-2019  skrll Fix a comment
 1.71 16-Apr-2019  skrll Whitespace
 1.70 14-Apr-2019  skrll Trailing whitespace
 1.69 23-Mar-2019  maxv Remove references to COMPAT_OSF1 in HPPA, it has never been supported on
this architecture.
 1.68 06-Apr-2012  skrll branches: 1.68.40;
Update comments to reflect that we always have a hardware FPU.
 1.67 06-Apr-2012  skrll Remove unnecessary cache flushes.

FP regs are stored in memory from a pool which is direct mapped and
therefore available in virtual and physical modes.
 1.66 06-Apr-2012  skrll unifdef FPEMUL. All our supported systems have an FPU.
 1.65 05-Apr-2012  skrll Whitespace in previous
 1.64 05-Apr-2012  skrll Use CR_ control regsiter definition for consistency.
 1.63 26-Feb-2012  skrll Enhance a comment.
 1.62 03-Jan-2012  skrll Fix the CPU #ifdefs
 1.61 02-Jan-2012  skrll From OpenBSD...

Fix encoding of DIAG instructions in the MFCPU_T and MTCPU_T macros. MTCPU_T
was encoded as a read instruction, while MFCPU_T was encoded as a
read-through-TH instruction, although the only uses of it concern registers
read through CH.

(You are not supposed to understand this, this is a dark corner of undocumented
rotten PA-RISC bowels).

Cache SID hashing will now correctly be disabled on PCXS, PCXT and PCXT'
processors.

Proper encoding from the old PA-RISC mklinux sources; tested on 720 (PCXS)
and 715/75 (PCXT); ok kettenis@
 1.60 28-Feb-2011  skrll branches: 1.60.4; 1.60.8;
Don't use %tr3 (aka cr27) in emu trap. cr27 is now used for lwp private
info.
 1.59 28-Feb-2011  skrll Remove old/incorrect comment.
 1.58 26-Feb-2011  skrll Whitespace.
 1.57 26-Feb-2011  skrll Add a comment.
 1.56 26-Feb-2011  skrll (Attempt to) bundle some stw/ldws and remove redundant CR_TLS save.
 1.55 24-Feb-2011  skrll No need to save CR_TLS twice in the DDB case.

hi joerg.
 1.54 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.53 23-Jan-2011  skrll Make some more information (psw/fpu_state) per cpu.
 1.52 22-Jan-2011  skrll Save CR24 and CR27 and report in ddb.
 1.51 22-Jan-2011  skrll Fix MULTIPROCESSOR curlwp/curcpu handling.
 1.50 06-Jun-2010  skrll branches: 1.50.2; 1.50.4;
MULTIPROCESSOR fixes

- provide curcpu in a control register instead of curlwp
- define {GET,SET}_CURLWP and GET_CURCPU and use whereever possible.
- define a cpu count and use it in CPU_INFO_FOREACH

XXX hppa_ncpus isn't valid yet.
 1.49 26-Apr-2010  skrll Remove unused BSS allocation.
 1.48 02-Apr-2010  skrll Per-cpu "physical" trap save area.
 1.47 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.46 11-Mar-2010  skrll branches: 1.46.2;
Comment style.
 1.45 11-Mar-2010  skrll A nullify snuck in. Remove it.
 1.44 11-Mar-2010  skrll Comment improvements.
 1.43 10-Mar-2010  skrll More comment improvement.
 1.42 10-Mar-2010  skrll Comment improvements.
 1.41 08-Mar-2010  skrll Fix and use the BSS macro.
 1.40 13-Feb-2010  skrll Remove unnecessary comment.
 1.39 13-Feb-2010  skrll Whitespace.
 1.38 17-Jan-2010  skrll branches: 1.38.2;
Remove an old comment.
 1.37 16-Jan-2010  skrll Tweak comment. From OpenBSD.
 1.36 15-Dec-2009  skrll Consistent comment format.
 1.35 15-Dec-2009  skrll Remove #if 0 / #endif section
 1.34 14-Dec-2009  skrll Remove redundant line.
 1.33 12-Dec-2009  skrll Correct/add comments.
 1.32 10-Dec-2009  rmind Rename L_ADDR to L_PCB and amend some comments accordingly.
 1.31 01-Dec-2009  skrll Remove U_PCB as requested by rmind.

Same code before and after.
 1.30 24-May-2009  skrll Kill '$' in exported symbols.
 1.29 24-May-2009  skrll G/C DTRAP
 1.28 30-Apr-2009  skrll Correct some CPU ifdefs so that a HP7100_CPU only kernel should compile.
 1.27 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.26 22-Aug-2008  skrll branches: 1.26.2; 1.26.8;
Update a comment.
 1.25 22-Aug-2008  skrll Typo in comment.
 1.24 28-Apr-2008  martin branches: 1.24.2; 1.24.6;
Remove clause 3 and 4 from TNF licenses
 1.23 21-Dec-2007  skrll branches: 1.23.6; 1.23.8; 1.23.10;
Improve ddb backtraces by:

- Starting with the right set of fp, pc, and rp in all cases.
- Dropping the argument printing stuff as it could never work.
- Backtrace through traps and decode syscalls properly by
making sure the trapframe is at a known offset from the stack
pointer in both cases. Also, ensure that the frame pointer
is zero so that we can detect traps.
 1.22 12-Nov-2007  skrll branches: 1.22.2; 1.22.6;
Fix kernel profiling on HPPA.

- stop gcc emitting stuff that HPUX requires
- don't use splhigh() in MCOUNT_ENTER as a call to _mcount will be
generated at the moment. Disable interrupts in hardware instead.
- Fix _PROF_PROLOGUE to save/restore all the register args when calling
_mcount.
- Fixup LEAF_ENTRY to dtrt (I think) in the GPROF case.
- Provide LEAF_ENTRY_NOPROFILE and sprinkle its use where i) profiling
causes problems, e.g. trap handlers, and ii) where it just doesn't
make sense, e.g. start.
 1.21 17-Oct-2007  garbled branches: 1.21.2;
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.20 18-May-2007  skrll branches: 1.20.8; 1.20.10; 1.20.14;
Use the CALL macro. No functional change.
 1.19 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.18 08-May-2007  skrll Remove useless comment.
 1.17 08-May-2007  skrll Use sr1 to jump to syscall as we just loaded it with the right value.
 1.16 12-Apr-2007  skrll branches: 1.16.2;
Remove unused label.
 1.15 19-Feb-2007  skrll branches: 1.15.4; 1.15.6;
Remove the requirement for $trap_tmp_save to be 2048 aligned. It's not
it for the sake of 4 instructions.
 1.14 15-Sep-2006  skrll branches: 1.14.6;
Fix comment. %t1 is the syscall # not curlwp.
 1.13 26-Aug-2006  skrll branches: 1.13.2;
Correct assembler syntax to load the correct (left) bits of a constant.

Inspired by OpenBSD.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.8;
merge ktrace-lwp.
 1.11 07-May-2005  chs branches: 1.11.2;
in the trap handler for T_EMULATION traps, also check if the opcode is 0xe.
if it is, then the instruction is an FPU instruction and we must not check
bits 23-25 since they are not a UID field in this format.

this fixes the spurious SIGILLs sometimes triggered by xmpyu instructions.
 1.10 14-Jul-2004  chs remove an extra instruction I added with an overzealous cut+paste.
 1.9 15-Jun-2004  chs flush the dcache after accessing pcb_fpregs.
we access it with the DTLB both on and off,
so we need to avoid bad cache aliases.
 1.8 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.7 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.6 23-Jun-2003  martin branches: 1.6.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.5 25-Aug-2002  fredette No longer use BTLB entries to map the entire address spaces of I/O subsystems,
since BTLB entries can be scarce and very little of an I/O subsystem normally
needs to be mapped.

Instead, the pmap now allows mappings of I/O space to be entered with
pmap_kenter_pa. bus_space mappings for small amounts of I/O space (as for
virtually all devices) are made this way, with BTLB entries still used for
large mappings for things like framebuffers.

This has led to more and cleaned-up uses of bus_space(9) and has caused
some autoconf cleanup. Also, kgdb is now attached and connected before
autoconfiguration, which is much earlier than before.
 1.4 13-Aug-2002  fredette Converted the fault handlers for the PA7100LC and up to handle
mappings not marked TLB_NO_RW_ALIAS.
 1.3 11-Aug-2002  fredette Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache. If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
 1.2 06-Jun-2002  fredette branches: 1.2.2; 1.2.4;
Fixed some mixup between processor number and type name,
i.e., PCXT is PA7100, not PA7200.
 1.1 05-Jun-2002  fredette Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.2.4.3 31-Aug-2002  gehenna catch up with -current.
 1.2.4.2 14-Jul-2002  gehenna catch up with -current.
 1.2.4.1 06-Jun-2002  gehenna file trap.S was added on branch gehenna-devsw on 2002-07-14 17:47:14 +0000
 1.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 06-Jun-2002  jdolecek file trap.S was added on branch kqueue on 2002-06-23 17:37:06 +0000
 1.6.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.2.5 21-Jan-2008  yamt sync with head
 1.11.2.4 15-Nov-2007  yamt sync with head.
 1.11.2.3 03-Sep-2007  yamt sync with head.
 1.11.2.2 26-Feb-2007  yamt sync with head.
 1.11.2.1 30-Dec-2006  yamt sync with head.
 1.12.8.1 03-Sep-2006  yamt sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.2.1 18-Nov-2006  ad Sync with head.
 1.14.6.4 17-May-2007  yamt sync with head.
 1.14.6.3 15-Apr-2007  yamt sync with head.
 1.14.6.2 12-Apr-2007  skrll Remove useless curlwp == NULL test.
 1.14.6.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.15.6.1 11-Jul-2007  mjf Sync with head.
 1.15.4.2 03-Dec-2007  ad Sync with HEAD.
 1.15.4.1 27-May-2007  ad Sync with head.
 1.16.2.1 22-May-2007  matt Update to HEAD.
 1.20.14.1 13-Nov-2007  bouyer Sync with HEAD
 1.20.10.2 09-Jan-2008  matt sync with HEAD
 1.20.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.1 14-Nov-2007  joerg Sync with HEAD.
 1.21.2.2 27-Dec-2007  mjf Sync with HEAD.
 1.21.2.1 19-Nov-2007  mjf Sync with HEAD.
 1.22.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.22.2.1 26-Dec-2007  ad Sync with head.
 1.23.10.5 11-Aug-2010  yamt sync with head.
 1.23.10.4 11-Mar-2010  yamt sync with head
 1.23.10.3 20-Jun-2009  yamt sync with head
 1.23.10.2 04-May-2009  yamt sync with head.
 1.23.10.1 16-May-2008  yamt sync with head.
 1.23.8.1 18-May-2008  yamt sync with head.
 1.23.6.2 28-Sep-2008  mjf Sync with HEAD.
 1.23.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.24.6.1 19-Oct-2008  haad Sync with HEAD.
 1.24.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.26.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.2.11 25-Apr-2009  skrll Turn off TLB_STATS_{PRE,AFT}
 1.26.2.10 25-Apr-2009  skrll Whitespace.
 1.26.2.9 19-Feb-2009  skrll Whitespace.
 1.26.2.8 13-Feb-2009  skrll Fix comment.
 1.26.2.7 13-Feb-2009  mjf Make sure the pipline has been completely flushed after executing an rfi
instruction. Without this I was being hit with an "Illegal instruction"
trap.
 1.26.2.6 04-Feb-2009  skrll Sprinkle _NOPROFILE so that profiling kernels boot.
 1.26.2.5 15-Dec-2008  skrll Comment fixes.
 1.26.2.4 07-Nov-2008  skrll Oops, need the user stack in %t4 for later.
 1.26.2.3 02-Nov-2008  skrll Use shadow registers in ibrk and not %t1/%t2.
 1.26.2.2 02-Nov-2008  skrll G/C __pmap_pv_update
 1.26.2.1 27-Oct-2008  skrll Commit work in progress.
 1.38.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.38.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.46.2.3 05-Mar-2011  rmind sync with head
 1.46.2.2 03-Jul-2010  rmind sync with head
 1.46.2.1 30-May-2010  rmind sync with head
 1.50.4.2 05-Mar-2011  bouyer Sync with HEAD
 1.50.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.50.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.60.8.4 29-Apr-2012  mrg sync to latest -current.
 1.60.8.3 05-Apr-2012  mrg sync to latest -current.
 1.60.8.2 04-Mar-2012  mrg sync to latest -current.
 1.60.8.1 18-Feb-2012  mrg merge to -current.
 1.60.4.1 17-Apr-2012  yamt sync with head
 1.68.40.1 10-Jun-2019  christos Sync with HEAD
 1.128 19-Sep-2025  skrll Whitespace
 1.127 19-Sep-2025  skrll Remove a magic number with s/3/HPPA_PC_PRIV_MASK/
 1.126 19-Sep-2025  skrll Code style around probe instruction priviledge level.

Actually use the PROBE_PL macro with a bitfield that covers the
instruction's 'i' immediate or 'r' fields and mask the bottom two bits as
the {read,write}_access_allowed architecture functions would.
 1.125 19-Sep-2025  skrll Remove empty else clause.
 1.124 19-Sep-2025  skrll Fix the inverted logic around probe access vs probe access immediate
instructions. This affected the probe

<__canonicalize_funcptr_for_compare+76>: probei,r (r20),3,r20

and manifested as tests/lib/libc/tls/t_tls_dynamic failures
 1.123 05-Oct-2023  ad branches: 1.123.8;
Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
 1.122 23-Jul-2023  skrll PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN

Provide syscall_intern and use the md_syscall in syscall trap handling.
 1.121 02-Sep-2022  thorpej branches: 1.121.4;
Remove unnecessary inclusion of <net/netisr.h>.
 1.120 09-Jun-2022  skrll Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT

This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and single-step breakpoints
 1.119 09-Jun-2022  skrll Handle 'NA' (non-access) traps for the lpa and probe instructions. The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current
 1.118 07-Jun-2022  skrll Whitespace
 1.117 28-May-2022  andvar fix various typos in comments, mainly origional->original,
extened->extended, incomming->incoming.
 1.116 19-Aug-2020  msaitoh s/ be be / be /
 1.115 25-Apr-2020  skrll Fix KASSERT that has been incorrect since revision 1.85 from 10 years
ago.
 1.114 06-Dec-2019  skrll branches: 1.114.6;
Simplify userret function signature. From ad@
 1.113 29-Nov-2019  ad PR port-sparc/54718 (sparc install hangs since recent scheduler changes)

- userret() must be called every time we return to user, it's not optional.
- If clearing the AST with interrupts off, you must loop over userret().
 1.112 21-Nov-2019  ad mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
 1.111 15-Apr-2019  skrll branches: 1.111.4;
Trailing whitespace
 1.110 06-Apr-2019  kamil Centralized shared part of child_return() into MI part

Add a new function md_child_return() for MD specific bits only.

New child_return() is now part of MI and central code that handles
uniformly tracing code (KTR and ptrace(2)).

Synchronize value passed to ktrsysret() among ports to SYS_fork. This is
a traditional value and accessing p_lflag to check for PL_PPWAIT shall
use locking against proc_lock. Returning SYS_fork vs SYS_vfork still isn't
correct enough as there are more entry points to forking code. Instead of
making it too good, just settle with plain SYS_fork for all ports.
 1.109 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

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

Welcome to NetBSD 8.99.37.
 1.108 03-Apr-2019  kamil Rework the fork(2)/vfork(2) event signalling under ptrace(2)

Remove the constraint of SIGTRAP event being maskable by a tracee.

Now all SIGTRAP TRAP_CHLD events are delivered to debugger.

This code touches MD specific logic and the child_return routine.
It's an intermediate step with a room for refactoring in future and
right now the least invasive approach. This allows to assert expected
behavior in already existing ATF tests and make the code prettier
in future keeping the same semantics. Probably there is a need for a MI
wrapper of child_return for shared functionality between ports.
 1.107 02-Mar-2015  martin branches: 1.107.10; 1.107.18;
Send SIGBUS when accessing mmap() past end of file (handle EINVAL in fault
path). While there, handle ENOMEM as well.
 1.106 06-Mar-2014  skrll branches: 1.106.6;
Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.105 13-Feb-2014  skrll Simplify cpu_spawn_return - setregs has done all the work already.
 1.104 25-Oct-2013  martin Change a few __unused to __diagused/__debugused
 1.103 19-Oct-2013  skrll Use __unused on a variable used in a KASSERT
 1.102 13-Jul-2013  skrll Use sy_invoke
 1.101 23-Apr-2012  skrll branches: 1.101.2; 1.101.4;
Pass the trap address in ksi_addr without privilege bits.

Previously GDB would get confused by the trap address given when hitting
the _rtld_debug_state breakpoint.
 1.100 06-Apr-2012  skrll unifdef FPEMUL. All our supported systems have an FPU.
 1.99 07-Mar-2012  skrll Deal with setting of space registers and protection ids for posix_spawn.

Thanks to martin for the help.
 1.98 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.97 13-Feb-2012  martin branches: 1.97.2;
Add missing MD code for posix_spawn
 1.96 23-Jan-2011  skrll branches: 1.96.4; 1.96.8;
Make some more information (psw/fpu_state) per cpu.
 1.95 20-Dec-2010  matt branches: 1.95.2; 1.95.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.94 09-Nov-2010  skrll #if 0 out the trap checks around tf_iioq_{head,tail}. The sti(4) code
can/will trigger them.
 1.93 07-Jul-2010  chs fix hppa ucas_*():
- "ret" is a kernel-space pointer.
- move the ucas RAS check from the device interrupt path
to the page-fault path.
 1.92 31-May-2010  skrll Fix previous.
 1.91 31-May-2010  skrll Pull change across from OpenBSD:

Make single stepping a system call work. Instead of single stepping
through the syscall gateway page, which doesn't work since that page is
shared between process, this makes us step over that bit by setting a
breakpoint on the instruction where the system call returns.
 1.90 26-Apr-2010  skrll SANITY output tweak.
 1.89 26-Apr-2010  skrll KNF
 1.88 23-Apr-2010  rmind Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
 1.87 06-Apr-2010  skrll Include SSBREAKPOINT in the PTRACE #ifdef/#endif.
 1.86 03-Apr-2010  skrll Add md_astpending to struct mdlwp and use it.
 1.85 31-Mar-2010  skrll Make cpl, ipending, and intr_depth per CPU values.
 1.84 24-Mar-2010  skrll Correct the list of traps that we need to get the va and space from
ii[os]q.

From OpenBSD.
 1.83 22-Mar-2010  skrll Wrap long line.
 1.82 22-Mar-2010  skrll Whitespace / comment formatting.
 1.81 22-Mar-2010  skrll Improve the output from frame_sanity_check.
 1.80 20-Mar-2010  chs fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
 1.79 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.78 11-Mar-2010  skrll branches: 1.78.2;
Start at the first, not the second, exception register.
 1.77 11-Mar-2010  skrll Comment formating.
 1.76 10-Feb-2010  skrll Oops. Whitespace in previous.
 1.75 10-Feb-2010  skrll Remove a cast by fixing a printf format.
 1.74 10-Feb-2010  skrll Reformat a comment.
 1.73 10-Feb-2010  skrll Minor tweaks.
 1.72 10-Feb-2010  skrll Use __arraycount
 1.71 17-Jan-2010  skrll branches: 1.71.2;
Use pmap_extract instead of kvtop.
 1.70 16-Jan-2010  skrll Tweak astpending handling.
 1.69 16-Jan-2010  skrll Check cpl level has returned to entry value when leaving trap/syscall.

From OpenBSD.
 1.68 16-Jan-2010  skrll Add a comment.
 1.67 16-Jan-2010  skrll Rename type_raw to trapnum and use in a couple more places.

Reduces diff to OpenBSD.
 1.66 16-Jan-2010  skrll Count traps in uvmexp. Reduces diff to OpenBSD.
 1.65 06-Jan-2010  skrll Update 64bit arg handling to use the flags in the syscall table.

Only do trace_enter/trace_exit if we're tracing.
 1.64 06-Jan-2010  skrll curlwp is never NULL now. Sprinkle KASSERT just in case.
 1.63 27-Nov-2009  skrll Fix DEBUG build. Hi rmind.
 1.62 27-Nov-2009  rmind - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.
 1.61 21-Nov-2009  rmind Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.60 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.59 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.58 11-Apr-2009  skrll Fixup two more syscalls with 64-bit args.

Remove reference to script that is supposed to do this automatically - I
don't have it.

Fixes PR/41185.
 1.57 21-Oct-2008  ad branches: 1.57.2; 1.57.8;
Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
 1.56 15-Oct-2008  wrstuden Merge wrstuden-revivesa into HEAD.
 1.55 28-Apr-2008  martin branches: 1.55.2; 1.55.6;
Remove clause 3 and 4 from TNF licenses
 1.54 06-Feb-2008  dsl branches: 1.54.6; 1.54.8; 1.54.10;
Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
 1.53 18-Jan-2008  skrll KNF
 1.52 18-Jan-2008  skrll Correct a comment.
 1.51 10-Jan-2008  skrll Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.50 05-Jan-2008  dsl Don't pass 'curlwp' into trace_enter() and trace_exit().
 1.49 05-Nov-2007  ad branches: 1.49.2; 1.49.8;
Don't set l_usrpri / spc_curpriority here. mi_userret() does it.
 1.48 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.47 02-Oct-2007  skrll branches: 1.47.2;
Make want_resched a member of cpu_info.
 1.46 15-Aug-2007  ad branches: 1.46.2; 1.46.4;
Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
 1.45 27-May-2007  skrll branches: 1.45.4; 1.45.8;
Fix up the frame sanity checking to not bitch when taking interrupts in
the sti ROM code.

Fixes PR/34715.

Thanks to David H. Gutteridge.
 1.44 18-May-2007  skrll Minor KNF and make some output a bit easier to read.
 1.43 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.42 04-Mar-2007  christos branches: 1.42.2; 1.42.4; 1.42.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.41 03-Mar-2007  skrll Remove hppa_{round,trunc}_page.
 1.40 09-Feb-2007  ad branches: 1.40.2;
Merge newlock2 to head.
 1.39 18-Dec-2006  skrll Update uvm_grow to support stacks that grow upwards.

Use on hppa and fix a bug in the hppa trap handler.
 1.38 09-Oct-2006  skrll branches: 1.38.2;
Make this compile without KTRACE.

From Sergey Svishchev in a private email.
 1.37 25-Aug-2006  skrll branches: 1.37.2; 1.37.4;
Fix a spello in a debug message.
 1.36 19-Jul-2006  ad - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
 1.35 07-Jul-2006  skrll Fix use of user_backtrace. It takes a lwp pointer now.
 1.34 12-May-2006  skrll branches: 1.34.4;
P_PROFIL is held in p_flag of struct proc so test for it there.
 1.33 15-Mar-2006  drochner branches: 1.33.2;
adapt to uvm_fault() interface cleanup: kill the useless 3rd argument
 1.32 07-Mar-2006  thorpej branches: 1.32.2;
Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
 1.31 07-Mar-2006  thorpej Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.
 1.30 24-Dec-2005  perry branches: 1.30.4; 1.30.6; 1.30.8;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.29 11-Dec-2005  christos merge ktrace-lwp.
 1.28 03-Jul-2005  he branches: 1.28.2;
Remove "bad" label no longer in use.
 1.27 01-Jul-2005  christos PR/29607: Christian Biere systrace doesn't handle interrupted syscalls properly
Instead of jumping to the default "bad" case, jump to the error handling
switch, so that we can deal with ERESTART/EJUSTRETURN properly.
 1.26 07-May-2005  chs add additional args to frame_sanity_check() so we can log which
context it was called from and the trap type (if called from trap()).
 1.25 01-May-2005  chs check pcb_onfault for kernel T_DATALIGN traps (for ddb).
 1.24 17-Feb-2005  tsutsui user_backtrace() is used if DEBUG or USERTRACE is defined, but not DIAGNOSTIC.
 1.23 07-Aug-2004  chs branches: 1.23.4; 1.23.6;
handle T_CONDITION traps (by sending SIGFPE).
fix T_EXCEPTION code to handle the other FP major opcodes.
 1.22 24-Jul-2004  chs real siginfo support.
 1.21 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.20 18-Jul-2004  chs use mi_userret().
 1.19 15-Jun-2004  chs clear pcb_onfault before calling uvm_fault() and restore it after.
remove some debug code that actually makes debugging harder.
 1.18 09-Jun-2004  chs redo rev. 1.13, handle curlwp being NULL correctly.
 1.17 16-May-2004  chs for instruction TLB miss traps, process the fault with VM_PROT_EXECUTE
instead of VM_PROT_READ (to support non-executable mappings).
 1.16 26-Mar-2004  drochner To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
 1.15 14-Mar-2004  cl add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
* VP id
* lock on VP data
* LWP on VP
* recently blocked LWP on VP
* queue of LWPs woken which ran on this VP before sleep
* faultaddr
* LWP cache for upcalls
* upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
 1.14 28-Nov-2003  chs de-__P, remove register, ansify.
 1.13 08-Nov-2003  tsutsui In trap(), curlwp could be NULL so don't refer it implicitly.
 1.12 31-Oct-2003  simonb Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
 1.11 21-Oct-2003  fvdl NULL -> 0 for preempt() argument.
 1.10 13-Oct-2003  cl add MD part of SA/pthread pagefault handling on hppa
 1.9 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 01-Apr-2003  thorpej branches: 1.7.2;
Use PAGE_SIZE rather than NBPG.
 1.6 21-Dec-2002  manu Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
 1.5 15-Nov-2002  manu Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
 1.4 19-Aug-2002  fredette Since trap_kdebug() may be a macro, be sure to cast to void when not
using its result.
 1.3 07-Jul-2002  fredette branches: 1.3.2;
Now include the HPPA trap number in a user backtrace, and display
backtraces for more traps.
 1.2 17-Jun-2002  christos branches: 1.2.2;
MD systrace gluons.
 1.1 05-Jun-2002  fredette Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 17-Jun-2002  jdolecek file trap.c was added on branch kqueue on 2002-06-23 17:37:06 +0000
 1.3.2.4 31-Aug-2002  gehenna catch up with -current.
 1.3.2.3 16-Jul-2002  gehenna catch up with -current.
 1.3.2.2 14-Jul-2002  gehenna catch up with -current.
 1.3.2.1 07-Jul-2002  gehenna file trap.c was added on branch gehenna-devsw on 2002-07-14 17:47:15 +0000
 1.7.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.2.3 12-Oct-2004  skrll Correct some ktr* calls to pass a struct lwp *
 1.7.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.23.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.23.4.1 29-Apr-2005  kent sync with -current
 1.28.2.8 11-Feb-2008  yamt sync with head.
 1.28.2.7 21-Jan-2008  yamt sync with head
 1.28.2.6 15-Nov-2007  yamt sync with head.
 1.28.2.5 27-Oct-2007  yamt sync with head.
 1.28.2.4 03-Sep-2007  yamt sync with head.
 1.28.2.3 26-Feb-2007  yamt sync with head.
 1.28.2.2 30-Dec-2006  yamt sync with head.
 1.28.2.1 21-Jun-2006  yamt sync with head.
 1.30.8.5 03-Sep-2006  yamt sync with head.
 1.30.8.4 11-Aug-2006  yamt sync with head
 1.30.8.3 24-May-2006  yamt sync with head.
 1.30.8.2 01-Apr-2006  yamt sync with head.
 1.30.8.1 13-Mar-2006  yamt sync with head.
 1.30.6.2 01-Jun-2006  kardel Sync with head.
 1.30.6.1 22-Apr-2006  simonb Sync with head.
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.32.2.2 19-Apr-2006  elad sync with head - hopefully this will work
 1.32.2.1 07-Mar-2006  elad file trap.c was added on branch elad-kernelauth on 2006-04-19 02:32:44 +0000
 1.33.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.34.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.37.4.2 18-Dec-2006  yamt sync with head.
 1.37.4.1 22-Oct-2006  yamt sync with head
 1.37.2.4 30-Jan-2007  ad Remove support for SA. Ok core@.
 1.37.2.3 29-Jan-2007  ad Make hp700 compile.
 1.37.2.2 12-Jan-2007  ad Sync with head.
 1.37.2.1 18-Nov-2006  ad Sync with head.
 1.38.2.2 06-Jul-2007  liamjfoy Pull up following revision(s) (requested by skrll in ticket #758):
sys/arch/hppa/hppa/trap.c: revision 1.45
Fix up the frame sanity checking to not bitch when taking interrupts in
the sti ROM code.
Fixes PR/34715.
Thanks to David H. Gutteridge.
 1.38.2.1 04-Jan-2007  bouyer branches: 1.38.2.1.2;
Pull up following revision(s) (requested by skrll in ticket #323):
sys/uvm/uvm_unix.c: revision 1.37
sys/arch/hppa/hppa/trap.c: revision 1.39
Update uvm_grow to support stacks that grow upwards.
Use on hppa and fix a bug in the hppa trap handler.
 1.38.2.1.2.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.40.2.5 02-May-2007  skrll Backout previous - the problem isn't in the syscall code not saving things
correctly. It's in pmap_activate which can overwrite the saved space
registers when switching back to the lwp if it was switched away from at
a critical point, e.g. in the syscall gateway page.

Not sure of a correct fix at the moment.
 1.40.2.4 10-Apr-2007  skrll Add the hack from OpenBSD for trap while in the SYSCALLGATE page. Add the
following comment to explain what's going on.

In case we were interrupted from the syscall gate page
treat this as we were not really running user code anymore

The problem is that if we preempt when returning from this
trap the interspace branch setting of IASQ to HPPA_SID_KERNEL
is not picked up by the syscall code. Instead, it will attempt
to return into the syscall gate page with the user space id
causing a (fatal) ITLB trap for the process.

The syscall handler should probably be fixed.
 1.40.2.3 04-Apr-2007  skrll More cleanup/improvement. Still WIP.
 1.40.2.2 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.40.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.42.10.3 03-Oct-2007  garbled Sync with HEAD
 1.42.10.2 26-Jun-2007  garbled Sync with HEAD.
 1.42.10.1 22-May-2007  matt Update to HEAD.
 1.42.4.1 11-Jul-2007  mjf Sync with head.
 1.42.2.5 03-Dec-2007  ad Sync with HEAD.
 1.42.2.4 09-Oct-2007  ad Sync with head.
 1.42.2.3 20-Aug-2007  ad Sync with HEAD.
 1.42.2.2 09-Jun-2007  ad Sync with head.
 1.42.2.1 27-May-2007  ad Sync with head.
 1.45.8.3 06-Nov-2007  joerg Sync with HEAD.
 1.45.8.2 02-Oct-2007  joerg Sync with HEAD.
 1.45.8.1 16-Aug-2007  jmcneill Sync with HEAD.
 1.45.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.46.4.1 06-Oct-2007  yamt sync with head.
 1.46.2.3 23-Mar-2008  matt sync with HEAD
 1.46.2.2 09-Jan-2008  matt sync with HEAD
 1.46.2.1 06-Nov-2007  matt sync with HEAD
 1.47.2.1 13-Nov-2007  bouyer Sync with HEAD
 1.49.8.3 19-Jan-2008  bouyer Sync with HEAD
 1.49.8.2 11-Jan-2008  bouyer Sync with HEAD
 1.49.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.49.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.54.10.4 11-Aug-2010  yamt sync with head.
 1.54.10.3 11-Mar-2010  yamt sync with head
 1.54.10.2 04-May-2009  yamt sync with head.
 1.54.10.1 16-May-2008  yamt sync with head.
 1.54.8.1 18-May-2008  yamt sync with head.
 1.54.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.54.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.55.6.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.55.6.1 19-Oct-2008  haad Sync with HEAD.
 1.55.2.4 14-Oct-2008  wrstuden Add a new vp-private flag, SAVP_FLAG_DELIVERING. This flag indicates
that the vp is in the process of delivering a new-thread upcall.
This is a BLOCKED or NEWPROC upcall. Do NOT generate any BLOCKED
upcalls while this is set. Set it at the end of sa_switchcall()
and clear it at syscall entry. Sadly, I have found no other
way to handle this. The old SA interface has no way for
userland to acknowledge that it got the upcall, so use syscall
entry as the indicator that libpthread got it.

This addresses the issue seen on current-users with firefox
dying with a blockedgen != unbockedgen error. The problem is we
deliver a BLOCKED upcall, but between the end of userret()
and when the CPU indicates that it's running in user mode, we take
a page fault. Said page fault blocks, blocking upcall delivery.
The original block, however, was short-lived, and the UNBLOCK
happens shortly. It happens before libpthread actually notices
the BLOCKED upcall. Boom!

Unfortunately a LOCKDEBUG/DIAGNOSTIC kernel still dies before
firefox opens. However this new issue is with uvm code calling
mtsleep when not holding a correct lock; sa_switch() is exploding
at KASSERT(lwp_locked(l, NULL)); before it's done _anything_.

Also, while here, add sa_system_disabled. This is an integer
that we examine when starting SA for a proc. If it's non-zero,
we error out. Once this is hooked into sysctl, you'll be able to
disable SA w/o recompiling.
 1.55.2.3 30-Jun-2008  wrstuden Change how we make SA threads not generate upcalls. Instead of clearing
LW_SA, use a private flag, LP_SA_NOBLOCK, that we set when we want
to not generate upcalls. This means we do NOT need to lock (l)
(ourselves) to set it.

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

Introduce code pattern to set & remember this:

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

...

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

l->l_pflag ^= f;

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

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

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

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

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

Tweak some comments.
 1.55.2.2 22-Jun-2008  wrstuden Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.
 1.55.2.1 10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.57.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.57.2.4 28-Apr-2009  skrll Sync with HEAD.
 1.57.2.3 19-Feb-2009  skrll Fixup redzone stuff and enable it if DIAGNOSTIC.
 1.57.2.2 22-Nov-2008  mjf Fix a typo I saw when turning on TRAPDEBUG. struct pmap doesn't have
a pmap_space member, it should be pm_space.
 1.57.2.1 27-Oct-2008  skrll Commit work in progress.
 1.71.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.71.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.78.2.3 05-Mar-2011  rmind sync with head
 1.78.2.2 03-Jul-2010  rmind sync with head
 1.78.2.1 30-May-2010  rmind sync with head
 1.95.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.95.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.96.8.4 29-Apr-2012  mrg sync to latest -current.
 1.96.8.3 11-Mar-2012  mrg sync to latest -current
 1.96.8.2 24-Feb-2012  mrg sync to -current.
 1.96.8.1 18-Feb-2012  mrg merge to -current.
 1.96.4.3 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.96.4.2 23-May-2012  yamt sync with head.
 1.96.4.1 17-Apr-2012  yamt sync with head
 1.97.2.2 23-Apr-2012  riz Pull up following revision(s) (requested by skrll in ticket #196):
sys/arch/hppa/hppa/trap.c: revision 1.101
Pass the trap address in ksi_addr without privilege bits.
Previously GDB would get confused by the trap address given when hitting
the _rtld_debug_state breakpoint.
 1.97.2.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by skrll in ticket #114):
sys/arch/hppa/hppa/trap.c: revision 1.99
sys/arch/hppa/hppa/vm_machdep.c: revision 1.51
sys/arch/hppa/hppa/vm_machdep.c: revision 1.52
Deal with setting of space registers and protection ids for posix_spawn.
Thanks to martin for the help.
Remove WIP code.
 1.101.4.2 18-May-2014  rmind sync with head
 1.101.4.1 28-Aug-2013  rmind sync with head
 1.101.2.2 03-Dec-2017  jdolecek update from HEAD
 1.101.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.106.6.1 06-Apr-2015  skrll Sync with HEAD
 1.107.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.107.18.1 10-Jun-2019  christos Sync with HEAD
 1.107.10.1 25-Apr-2020  martin Pull up following revision(s) (requested by skrll in ticket #1542):

sys/arch/hppa/hppa/trap.c: revision 1.115

Fix KASSERT that has been incorrect since revision 1.85 from 10 years
ago.
 1.111.4.4 23-Sep-2025  martin Pull up following revision(s) (requested by skrll in ticket #1967):

sys/arch/hppa/hppa/trap.c: revision 1.124
sys/arch/hppa/hppa/trap.c: revision 1.125
sys/arch/hppa/hppa/trap.c: revision 1.126
sys/arch/hppa/hppa/trap.c: revision 1.127
sys/arch/hppa/hppa/trap.c: revision 1.128

Fix the inverted logic around probe access vs probe access immediate
instructions. This affected the probe
<__canonicalize_funcptr_for_compare+76>: probei,r (r20),3,r20
and manifested as tests/lib/libc/tls/t_tls_dynamic failures

Remove empty else clause.

Code style around probe instruction priviledge level.

Actually use the PROBE_PL macro with a bitfield that covers the
instruction's 'i' immediate or 'r' fields and mask the bottom two bits as
the {read,write}_access_allowed architecture functions would.

Remove a magic number with s/3/HPPA_PC_PRIV_MASK/

Whitespace
 1.111.4.3 10-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1468):

sys/arch/hppa/hppa/trap.c: revision 1.120
sys/arch/hppa/include/ptrace.h: revision 1.11-1.12 (via patch)

Define a PTRACE_ILLEGAL_ASM

Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.

Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT
This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and
single-step breakpoints
 1.111.4.2 10-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1466):

sys/arch/hppa/hppa/trap.c: revision 1.119

Handle 'NA' (non-access) traps for the lpa and probe instructions. The
change is inspired by OpenBSD with a bunch of my own, mainly stylistic,
changes.

Thanks to Tom Lane for the analysis.

PR/56118: sporadic app crashes in HPPA -current
 1.111.4.1 25-Apr-2020  martin Pull up following revision(s) (requested by skrll in ticket #854):

sys/arch/hppa/hppa/trap.c: revision 1.115

Fix KASSERT that has been incorrect since revision 1.85 from 10 years
ago.
 1.114.6.1 25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)
 1.121.4.1 23-Sep-2025  martin Pull up following revision(s) (requested by skrll in ticket #1161):

sys/arch/hppa/hppa/trap.c: revision 1.124
sys/arch/hppa/hppa/trap.c: revision 1.125
sys/arch/hppa/hppa/trap.c: revision 1.126
sys/arch/hppa/hppa/trap.c: revision 1.127
sys/arch/hppa/hppa/trap.c: revision 1.128

Fix the inverted logic around probe access vs probe access immediate
instructions. This affected the probe
<__canonicalize_funcptr_for_compare+76>: probei,r (r20),3,r20
and manifested as tests/lib/libc/tls/t_tls_dynamic failures

Remove empty else clause.

Code style around probe instruction priviledge level.

Actually use the PROBE_PL macro with a bitfield that covers the
instruction's 'i' immediate or 'r' fields and mask the bottom two bits as
the {read,write}_access_allowed architecture functions would.

Remove a magic number with s/3/HPPA_PC_PRIV_MASK/

Whitespace
 1.123.8.1 23-Sep-2025  martin Pull up following revision(s) (requested by skrll in ticket #33):

sys/arch/hppa/hppa/trap.c: revision 1.124
sys/arch/hppa/hppa/trap.c: revision 1.125
sys/arch/hppa/hppa/trap.c: revision 1.126
sys/arch/hppa/hppa/trap.c: revision 1.127
sys/arch/hppa/hppa/trap.c: revision 1.128

Fix the inverted logic around probe access vs probe access immediate
instructions. This affected the probe
<__canonicalize_funcptr_for_compare+76>: probei,r (r20),3,r20
and manifested as tests/lib/libc/tls/t_tls_dynamic failures

Remove empty else clause.

Code style around probe instruction priviledge level.

Actually use the PROBE_PL macro with a bitfield that covers the
instruction's 'i' immediate or 'r' fields and mask the bottom two bits as
the {read,write}_access_allowed architecture functions would.

Remove a magic number with s/3/HPPA_PC_PRIV_MASK/

Whitespace
 1.58 25-Feb-2023  skrll Convert some assignments into KASSERTs.

l_md is zeroised by lwp_create with

memset(&l2->l_startzero, 0, sizeof(*l2) -
offsetof(lwp_t, l_startzero));
 1.57 29-Sep-2022  skrll Remove unnecessary include of <sys/malloc.h>.
 1.56 01-Jan-2022  macallan make this compile again by moving a KASSERT into the #ifdef DIAGNOSTIC block
it depends on
 1.55 15-Apr-2019  skrll Trailing whitespace
 1.54 06-Mar-2014  skrll branches: 1.54.30;
Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.53 13-Feb-2014  skrll Slight code re-arrangement. No functional change.
 1.52 07-Mar-2012  skrll branches: 1.52.2; 1.52.4;
Remove WIP code.
 1.51 07-Mar-2012  skrll Deal with setting of space registers and protection ids for posix_spawn.

Thanks to martin for the help.
 1.50 19-Feb-2012  rmind Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
 1.49 24-Feb-2011  joerg branches: 1.49.4; 1.49.8; 1.49.10;
Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.48 10-Feb-2011  pooka Make vmapbuf() return success/error and make physio deal with a
failure.
 1.47 07-Feb-2011  skrll Fix PR/44500 for hppa.
 1.46 23-Jan-2011  skrll Make some more information (psw/fpu_state) per cpu.
 1.45 06-Jun-2010  skrll branches: 1.45.2; 1.45.4;
Pullup across/adapt fix from OpenBSD:

Properly initialize the members of `struct mdproc' that deal with
single-stepping when we fork and reset them upon exec.
 1.44 03-Apr-2010  skrll Add md_astpending to struct mdlwp and use it.
 1.43 01-Apr-2010  skrll Small simplification
 1.42 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.41 08-Mar-2010  skrll branches: 1.41.2;
Set the frame pointer of newly created and function changing LWPs to 0
for the benefit of DDB.
 1.40 17-Jan-2010  skrll branches: 1.40.2;
Use pmap_extract instead of kvtop.
 1.39 29-Nov-2009  rmind Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork().
 1.38 21-Nov-2009  rmind Use lwp_getpcb() on hppa and ia64, clean from struct user usage.
 1.37 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.36 03-Jun-2009  skrll Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup().
 1.35 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.34 19-Nov-2008  ad branches: 1.34.4;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.33 17-Oct-2008  skrll branches: 1.33.2; 1.33.4; 1.33.6;
Typo in previous.
 1.32 16-Oct-2008  skrll Bring back cpu_setfunc.

cpu_lwp_fork should use cpu_setfunc, but not right now.
 1.31 29-Jan-2008  skrll branches: 1.31.6; 1.31.10; 1.31.16;
bcopy -> memcpy
 1.30 10-Jan-2008  skrll Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.29 17-Oct-2007  garbled branches: 1.29.2; 1.29.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.28 17-Aug-2007  ad branches: 1.28.2;
cpu_lwp_fork: don't rely on struct mdlwp being zeroed in advance.
 1.27 12-Jul-2007  skrll branches: 1.27.4; 1.27.8;
Like I said - don't futz with the trapframe in pmap_activate. Instead
update the trapframe space and protection register in cpu_lwp_fork and
setregs.
 1.26 18-May-2007  skrll pmap_activate shouldn't play with the trap frame - especially not now it's
called by the MI code.

Implement a way of tracking the vmspace allocated to a process and its
LWPs so that if it changes underneath us we can correct the space id in
the trapframe in pmap_activate for now.

An example of when this happens is vfork/exec.

An exec hook is probably the way to go.
 1.25 17-May-2007  yamt merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.24 16-Mar-2007  skrll branches: 1.24.4;
Move a comment and correct a typo.
 1.23 04-Mar-2007  christos branches: 1.23.2; 1.23.4; 1.23.6;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.21 09-Feb-2007  ad branches: 1.21.2;
Merge newlock2 to head.
 1.20 14-Oct-2006  skrll Reformat a comment and fix a typo.
 1.19 11-Dec-2005  christos branches: 1.19.20; 1.19.22;
merge ktrace-lwp.
 1.18 10-Jun-2005  he branches: 1.18.2;
Remove the declaration of a now-unused local variable.
 1.17 10-Jun-2005  matt Rework the coredump code to have no explicit knownledge of how coredump
i/o is done. Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o. This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
 1.16 01-May-2005  chs in cpu_lwp_free(), use hppa_fpu_flush() instead of a broken inline version.
in vmapbuf() and vunmapbuf(), adapt to yamt-km API changes.
 1.15 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.14 17-Sep-2004  skrll branches: 1.14.4; 1.14.6;
There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
 1.13 28-Aug-2004  thorpej Garbage-collect pagemove(); nothing use it anymore (YAY!!!)
 1.12 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.11 18-Jul-2004  chs add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.10 18-Jul-2004  chs store the kernel stack pointer for a sleeping LWP in its PCB instead of
in its trapframe. this is needed for scheduler activations, so that we can
change the user stack pointer via the trapframe. from openbsd.
 1.9 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.8 28-Nov-2003  chs de-__P, remove register, ansify.
 1.7 18-Nov-2003  chs fix address computation in vmapbuf(). use uvm_km_valloc_prefer_wait().
call pmap_remove() explicitly in vunmapbuf(), this has been required
for several years now. fixes PR 20933.
 1.6 25-Oct-2003  jdolecek g/c #if 0'ed (and empty) cpu_wait()
 1.5 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 01-Apr-2003  thorpej branches: 1.3.2;
Use PAGE_SIZE rather than NBPG.
 1.2 01-Jul-2002  fredette branches: 1.2.2;
Made the signal trampoline PLABEL-aware.

Added a missing comma to the pmap_redzone() call.
 1.1 05-Jun-2002  fredette branches: 1.1.2;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file vm_machdep.c was added on branch kqueue on 2002-06-23 17:37:06 +0000
 1.2.2.3 16-Jul-2002  gehenna catch up with -current.
 1.2.2.2 14-Jul-2002  gehenna catch up with -current.
 1.2.2.1 01-Jul-2002  gehenna file vm_machdep.c was added on branch gehenna-devsw on 2002-07-14 17:47:15 +0000
 1.3.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Sep-2004  skrll Sync with HEAD
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.6.1 02-Feb-2005  yamt convert arch/hppa.
 1.14.4.1 29-Apr-2005  kent sync with -current
 1.18.2.5 04-Feb-2008  yamt sync with head.
 1.18.2.4 21-Jan-2008  yamt sync with head
 1.18.2.3 03-Sep-2007  yamt sync with head.
 1.18.2.2 26-Feb-2007  yamt sync with head.
 1.18.2.1 30-Dec-2006  yamt sync with head.
 1.19.22.1 22-Oct-2006  yamt sync with head
 1.19.20.2 29-Jan-2007  ad Make hp700 compile.
 1.19.20.1 18-Nov-2006  ad Sync with head.
 1.21.2.6 06-Apr-2007  skrll Nuke cpu_setfunc
 1.21.2.5 04-Apr-2007  skrll More cleanup/improvement. Still WIP.
 1.21.2.4 24-Mar-2007  yamt sync with head.
 1.21.2.3 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.21.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.21.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.23.6.1 18-Mar-2007  reinoud First attempt to bring branch in sync with HEAD
 1.23.4.1 11-Jul-2007  mjf Sync with head.
 1.23.2.4 20-Aug-2007  ad Sync with HEAD.
 1.23.2.3 15-Jul-2007  ad Sync with head.
 1.23.2.2 27-May-2007  ad Sync with head.
 1.23.2.1 10-Apr-2007  ad Sync with head.
 1.24.4.2 03-Oct-2007  garbled Sync with HEAD
 1.24.4.1 22-May-2007  matt Update to HEAD.
 1.27.8.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.27.4.1 03-Sep-2007  skrll Sync with HEAD.
 1.28.2.2 23-Mar-2008  matt sync with HEAD
 1.28.2.1 06-Nov-2007  matt sync with HEAD
 1.29.8.1 11-Jan-2008  bouyer Sync with HEAD
 1.29.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.31.16.2 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.31.16.1 19-Oct-2008  haad Sync with HEAD.
 1.31.10.4 11-Aug-2010  yamt sync with head.
 1.31.10.3 11-Mar-2010  yamt sync with head
 1.31.10.2 20-Jun-2009  yamt sync with head
 1.31.10.1 04-May-2009  yamt sync with head.
 1.31.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.33.6.2 22-Feb-2010  snj Apply patch (requested by skrll in ticket #1312):
Fix ticket #793: s/setfunc_trampoline/lwp_trampoline/.
 1.33.6.1 05-Jun-2009  snj branches: 1.33.6.1.2;
Pull up following revision(s) (requested by skrll in ticket #793):
sys/arch/hppa/hppa/vm_machdep.c: revision 1.36
sys/arch/hp700/include/cpu.h: revision 1.34
sys/arch/hp700/hp700/locore.S: revision 1.35
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup().
 1.33.6.1.2.1 21-Apr-2010  matt sync to netbsd-5
 1.33.4.2 22-Feb-2010  snj Apply patch (requested by skrll in ticket #1312):
Fix ticket #793: s/setfunc_trampoline/lwp_trampoline/.
 1.33.4.1 05-Jun-2009  snj Pull up following revision(s) (requested by skrll in ticket #793):
sys/arch/hppa/hppa/vm_machdep.c: revision 1.36
sys/arch/hp700/include/cpu.h: revision 1.34
sys/arch/hp700/hp700/locore.S: revision 1.35
Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup().
 1.33.2.6 24-Feb-2009  skrll Fix non-DIAGNOSTIC builds and

-#if DIAGNOSTIC
+#ifdef DIAGNOSTIC
 1.33.2.5 19-Feb-2009  skrll Fixup redzone stuff and enable it if DIAGNOSTIC.
 1.33.2.4 15-Feb-2009  skrll Fix thinko in PSW_O handling.
 1.33.2.3 25-Jan-2009  skrll Merge from OpenBSD:

- Preserve PSW_O status when forking.
- Copyright maintenance
 1.33.2.2 19-Jan-2009  skrll Sync with HEAD.
 1.33.2.1 27-Oct-2008  skrll Commit work in progress.
 1.34.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.40.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.40.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.41.2.3 05-Mar-2011  rmind sync with head
 1.41.2.2 03-Jul-2010  rmind sync with head
 1.41.2.1 30-May-2010  rmind sync with head
 1.45.4.3 05-Mar-2011  bouyer Sync with HEAD
 1.45.4.2 17-Feb-2011  bouyer Sync with HEAD
 1.45.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.45.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.49.10.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by skrll in ticket #114):
sys/arch/hppa/hppa/trap.c: revision 1.99
sys/arch/hppa/hppa/vm_machdep.c: revision 1.51
sys/arch/hppa/hppa/vm_machdep.c: revision 1.52
Deal with setting of space registers and protection ids for posix_spawn.
Thanks to martin for the help.
Remove WIP code.
 1.49.8.2 11-Mar-2012  mrg sync to latest -current
 1.49.8.1 24-Feb-2012  mrg sync to -current.
 1.49.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.49.4.1 17-Apr-2012  yamt sync with head
 1.52.4.1 18-May-2014  rmind sync with head
 1.52.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.54.30.1 10-Jun-2019  christos Sync with HEAD
 1.16 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.15 04-Nov-2024  christos Undo previous lwp.h change.
 1.14 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 1.13 12-Jul-2018  maxv branches: 1.13.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.12 27-Dec-2014  martin branches: 1.12.16; 1.12.18;
fenv(3) support for hppa
 1.11 24-Feb-2014  skrll branches: 1.11.4; 1.11.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.10 17-Jul-2011  joerg branches: 1.10.2; 1.10.12; 1.10.16;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.9 09-Feb-2007  ad Merge newlock2 to head.
 1.8 06-Feb-2007  skrll G/C hp{pa,700}/spinlock.h
 1.7 26-Jul-2006  drochner branches: 1.7.4;
don't install <machine/db_machdep.h>, this is kernel only
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.8;
merge ktrace-lwp.
 1.5 08-May-2004  kleink branches: 1.5.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.4 20-Sep-2003  matt Install <hppa/mcontext.h>
 1.3 26-Nov-2002  lukem branches: 1.3.6;
Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.2 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.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file Makefile was added on branch gehenna-devsw on 2002-07-14 17:47:16 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:37:06 +0000
 1.3.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.2 26-Feb-2007  yamt sync with head.
 1.5.12.1 30-Dec-2006  yamt sync with head.
 1.6.8.1 11-Aug-2006  yamt sync with head
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.7.4.2 09-Feb-2007  ad Sync with HEAD.
 1.7.4.1 29-Jan-2007  ad Make hp700 compile.
 1.10.16.1 18-May-2014  rmind sync with head
 1.10.12.2 03-Dec-2017  jdolecek update from HEAD
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.6.1 06-Apr-2015  skrll Sync with HEAD
 1.11.4.1 20-Jan-2015  snj Pull up following revision(s) (requested by martin in ticket #416):
distrib/sets/lists/comp/md.hppa: revision 1.3
include/fenv.h: revision 1.13 via patch
lib/libm/Makefile: revision 1.168
lib/libm/arch/hppa/fenv.c: revisions 1.1, 1.2
sys/arch/hppa/include/Makefile: revision 1.12
sys/arch/hppa/include/fenv.h: revisions 1.1, 1.2
sys/arch/hppa/include/ieeefp.h: revisions 1.5-1.7
tests/lib/libm/Makefile: revision 1.29 via patch
fenv(3) support for hppa
--
use unsigned over uint32_t so that this file works without stdint.h
being included before hand.
fixes mknative-gcc problems, and likely others.
--
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
--
Simplify, now that rounding mode defines match the hardware bits.
 1.12.18.1 10-Jun-2019  christos Sync with HEAD
 1.12.16.1 28-Jul-2018  pgoyette Sync with HEAD
 1.13.36.1 02-Aug-2025  perseant Sync with HEAD
 1.15 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.14 17-Jun-2015  martin branches: 1.14.18;
Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
 1.13 17-Jul-2011  joerg branches: 1.13.12; 1.13.28; 1.13.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.12 27-Mar-2010  tnozaki 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
 1.11 11-Jan-2009  christos branches: 1.11.4; 1.11.6;
merge christos-time_t
 1.10 22-Mar-2008  simonb branches: 1.10.2; 1.10.6; 1.10.14;
Remove unused _BSD_OFF_T_.
 1.9 17-Oct-2007  garbled branches: 1.9.16;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 03-Sep-2007  drochner clean up some definitions around rune_t which are not needed anymore
 1.7 04-Oct-2006  tnozaki branches: 1.7.8; 1.7.16; 1.7.22; 1.7.26; 1.7.28;
fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
 1.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
merge ktrace-lwp.
 1.5 04-Feb-2005  skrll branches: 1.5.6;
Modernise these to use GCC __builtin_* functions and types.

Also provide a (protected) va_copy.
 1.4 06-Oct-2003  matt branches: 1.4.8; 1.4.10;
Change headers to comply with the new toolchain changes.
 1.3 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.2 02-Mar-2003  tshiozak branches: 1.2.2;
add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file ansi.h was added on branch gehenna-devsw on 2002-07-14 17:47:17 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file ansi.h was added on branch kqueue on 2002-06-23 17:37:06 +0000
 1.2.2.4 04-Feb-2005  skrll Sync with HEAD.
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.10.1 12-Feb-2005  yamt sync with head.
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5.6.3 24-Mar-2008  yamt sync with head.
 1.5.6.2 27-Oct-2007  yamt sync with head.
 1.5.6.1 30-Dec-2006  yamt sync with head.
 1.6.22.1 22-Oct-2006  yamt sync with head
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.28.1 06-Nov-2007  matt sync with HEAD
 1.7.26.1 02-Oct-2007  joerg Sync with HEAD.
 1.7.22.1 10-Sep-2007  skrll Sync with HEAD.
 1.7.16.1 03-Oct-2007  garbled Sync with HEAD
 1.7.8.1 09-Oct-2007  ad Sync with head.
 1.9.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.14.1 19-Jan-2009  skrll Sync with HEAD.
 1.10.6.2 11-Aug-2010  yamt sync with head.
 1.10.6.1 04-May-2009  yamt sync with head.
 1.10.2.2 30-Mar-2008  christos time_t is now __int64_t
 1.10.2.1 29-Mar-2008  christos Welcome to the time_t=long long dev_t=uint64_t branch.
 1.11.6.1 30-May-2010  rmind sync with head
 1.11.4.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.13.30.1 22-Sep-2015  skrll Sync with HEAD
 1.13.28.1 16-Jul-2015  riz Pull up following revision(s) (requested by martin in ticket #846):
sys/arch/mips/include/ansi.h: revision 1.29
sys/arch/sh3/include/ansi.h: revision 1.16
sys/arch/sparc64/include/ansi.h: revision 1.18
sys/arch/m68k/include/ansi.h: revision 1.24
sys/arch/powerpc/include/ansi.h: revision 1.30
sys/arch/hppa/include/ansi.h: revision 1.14
sys/arch/i386/include/ansi.h: revision 1.27
sys/arch/alpha/include/ansi.h: revision 1.25
sys/arch/usermode/include/ansi.h: revision 1.5
sys/arch/sparc/include/ansi.h: revision 1.24
Make _BSD_CLOCK_T_ unsigned int so it's the same for IPL32 and LP64
environments. We don't really have a powerpc64 native userland
and the mips64 native userland is IPL32 so this shouldn't affect anything.
Make clock_t unsigned
Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
 1.13.12.1 03-Dec-2017  jdolecek update from HEAD
 1.14.18.1 10-Jun-2019  christos Sync with HEAD
 1.3 16-Apr-2019  skrll Trailing whitespace
 1.2 10-Dec-2002  thorpej branches: 1.2.198;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file aout_machdep.h was added on branch gehenna-devsw on 2002-07-14 17:47:17 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file aout_machdep.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.2.198.1 10-Jun-2019  christos Sync with HEAD
 1.20 06-Jan-2025  martin PR 58960: fix misunderstanding in semantic and provide both the original
id string as well as _NETBSD_REVISIONID.
Do not rely on string concatenation in the inline assembler, use .ascii
and .asciz for individual string parts instead.
 1.19 04-Jan-2025  skrll PR 58960: hppa/asm.h: Respect _NETBSD_REVISIONID.
 1.18 01-Jun-2022  skrll branches: 1.18.10;
delay slot indentation
 1.17 17-Apr-2020  joerg Mark the .ident section as mergable string section to avoid redundant
entries.
 1.16 16-Apr-2019  skrll branches: 1.16.10;
Trailing whitespace
 1.15 12-Sep-2013  joerg branches: 1.15.30;
Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
 1.14 13-Jul-2013  skrll Put some common entry stuff into _ENTRY and use it.
 1.13 12-Feb-2011  matt branches: 1.13.4; 1.13.14; 1.13.18;
Put RCSIDs in section .ident. (use .pushsection/.popsection)
 1.12 20-Dec-2010  joerg branches: 1.12.2; 1.12.4;
Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.
 1.11 08-Mar-2010  skrll branches: 1.11.2;
Fix and use the BSS macro.
 1.10 11-Aug-2008  skrll branches: 1.10.14;
Define _ASM_LS_CHAR as '!' on hppa.
 1.9 02-Dec-2007  skrll branches: 1.9.14; 1.9.18; 1.9.20; 1.9.24;
Provide a _C_LABEL
 1.8 12-Nov-2007  skrll Fix kernel profiling on HPPA.

- stop gcc emitting stuff that HPUX requires
- don't use splhigh() in MCOUNT_ENTER as a call to _mcount will be
generated at the moment. Disable interrupts in hardware instead.
- Fix _PROF_PROLOGUE to save/restore all the register args when calling
_mcount.
- Fixup LEAF_ENTRY to dtrt (I think) in the GPROF case.
- Provide LEAF_ENTRY_NOPROFILE and sprinkle its use where i) profiling
causes problems, e.g. trap handlers, and ii) where it just doesn't
make sense, e.g. start.
 1.7 07-Apr-2007  skrll branches: 1.7.12; 1.7.14; 1.7.18; 1.7.20;
Improve EXIT and add a BSS macro. From OpenBSD.

Implement WARN_REFERENCES.
 1.6 20-Jan-2006  christos branches: 1.6.24; 1.6.28; 1.6.30;
Add a STRONG_ALIAS macro
 1.5 11-Dec-2005  christos branches: 1.5.2;
merge ktrace-lwp.
 1.4 18-Jul-2004  chs branches: 1.4.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.3 06-Oct-2003  matt Change headers to comply with the new toolchain changes.
 1.2 04-Jul-2002  thorpej branches: 1.2.2; 1.2.8;
Add ENTRY_NOPROFILE().
 1.1 05-Jun-2002  fredette branches: 1.1.2;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file asm.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.2.8.1 03-Aug-2004  skrll Sync with HEAD
 1.2.2.3 16-Jul-2002  gehenna catch up with -current.
 1.2.2.2 14-Jul-2002  gehenna catch up with -current.
 1.2.2.1 04-Jul-2002  gehenna file asm.h was added on branch gehenna-devsw on 2002-07-14 17:47:17 +0000
 1.4.12.4 07-Dec-2007  yamt sync with head
 1.4.12.3 15-Nov-2007  yamt sync with head.
 1.4.12.2 03-Sep-2007  yamt sync with head.
 1.4.12.1 21-Jun-2006  yamt sync with head.
 1.5.2.1 01-Feb-2006  yamt sync with head.
 1.6.30.1 11-Jul-2007  mjf Sync with head.
 1.6.28.3 03-Dec-2007  ad Sync with HEAD.
 1.6.28.2 03-Dec-2007  ad Sync with HEAD.
 1.6.28.1 10-Apr-2007  ad Sync with head.
 1.6.24.1 15-Apr-2007  yamt sync with head.
 1.7.20.2 08-Dec-2007  mjf Sync with HEAD.
 1.7.20.1 19-Nov-2007  mjf Sync with HEAD.
 1.7.18.1 13-Nov-2007  bouyer Sync with HEAD
 1.7.14.1 09-Jan-2008  matt sync with HEAD
 1.7.12.2 03-Dec-2007  joerg Sync with HEAD.
 1.7.12.1 14-Nov-2007  joerg Sync with HEAD.
 1.9.24.1 19-Oct-2008  haad Sync with HEAD.
 1.9.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.18.2 11-Mar-2010  yamt sync with head
 1.9.18.1 04-May-2009  yamt sync with head.
 1.9.14.1 28-Sep-2008  mjf Sync with HEAD.
 1.10.14.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11.2.1 05-Mar-2011  rmind sync with head
 1.12.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.12.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.18.2 18-May-2014  rmind sync with head
 1.13.18.1 28-Aug-2013  rmind sync with head
 1.13.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.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.15.30.2 21-Apr-2020  martin Sync with HEAD
 1.15.30.1 10-Jun-2019  christos Sync with HEAD
 1.16.10.1 20-Apr-2020  bouyer Sync with HEAD
 1.18.10.1 02-Aug-2025  perseant Sync with HEAD
 1.2 16-Jun-2017  jdolecek dumpconf(void) long doesn't exist, remove the prototype

PR kern/39714 by Henning Petersen
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 28-Aug-2017  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file autoconf.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file autoconf.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file autoconf.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file bootinfo.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file bootinfo.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file bootinfo.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 31-Jan-2006  dsl Change sys/arch/xxx/include/bswap.h to #include machine/byte_swap.h then
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26; 1.1.38;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.38.1 01-Feb-2006  yamt sync with head.
 1.1.26.1 21-Jun-2006  yamt sync with head.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file bswap.h was added on branch gehenna-devsw on 2002-07-14 17:47:18 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file bswap.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.3 28-Jan-2024  macallan add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.2 23-Sep-2019  skrll branches: 1.2.26;
Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file bus_defs.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file bus_defs.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file bus_defs.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.26.1 17-Feb-2024  martin Pull up following revision(s) (requested by macallan in ticket #592):

sys/arch/hppa/hppa/mainbus.c: revision 1.13
sys/arch/hppa/dev/elroy.c: revision 1.7
sys/arch/hppa/dev/dino.c: revision 1.17
sys/arch/hppa/include/bus_funcs.h: revision 1.2
sys/arch/hppa/include/bus_defs.h: revision 1.3

add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.2 28-Jan-2024  macallan add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.66;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.66.1 17-Feb-2024  martin Pull up following revision(s) (requested by macallan in ticket #592):

sys/arch/hppa/hppa/mainbus.c: revision 1.13
sys/arch/hppa/dev/elroy.c: revision 1.7
sys/arch/hppa/dev/dino.c: revision 1.17
sys/arch/hppa/include/bus_funcs.h: revision 1.2
sys/arch/hppa/include/bus_defs.h: revision 1.3

add missing bus_space_*_stream() methods instead of quietly aliasing them
to their potentially byte-swapping regular counterparts

ok skrll@
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file bus_funcs.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file bus_funcs.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file bus_funcs.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.8 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.7 03-Feb-2006  dsl branches: 1.7.74; 1.7.82; 1.7.88;
Use uint32_t and uint16_t not in_addr_t and in_port_t
 1.6 30-Jan-2006  dsl branches: 1.6.2;
Move all the stuff that detects bswapxx(constant) into the MI sys/bswap.h
Put the minimum to define the required inline assembler or C into the MD files.
NB: there may be some fallout from this!
 1.5 28-Dec-2005  perry branches: 1.5.2;
inline -> __inline
 1.4 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 06-Oct-2003  matt branches: 1.2.16;
Change headers to comply with the new toolchain changes.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file byte_swap.h was added on branch gehenna-devsw on 2002-07-14 17:47:18 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file byte_swap.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.5.2.2 18-Feb-2006  yamt sync with head.
 1.5.2.1 01-Feb-2006  yamt sync with head.
 1.6.2.1 09-Sep-2006  rpaulo sync with head
 1.7.88.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.82.1 27-Oct-2008  skrll Commit work in progress.
 1.7.74.1 04-May-2009  yamt sync with head.
 1.3 18-Mar-2014  christos Make all __ALIGNBYTES macros return the same type (size_t)
 1.2 20-Jan-2012  joerg branches: 1.2.6; 1.2.10;
Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.150; 1.1.154;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.154.1 18-Feb-2012  mrg merge to -current.
 1.1.150.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.150.1 17-Apr-2012  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file cdefs.h was added on branch gehenna-devsw on 2002-07-14 17:47:19 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file cdefs.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.2.10.1 18-May-2014  rmind sync with head
 1.2.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13 23-Feb-2023  riastradh hppa: Add missing barriers in cpu_switchto.

PR kern/57240

Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?
 1.12 02-Nov-2021  ryo branches: 1.12.4;
In order to prevent _mcount() from being recursively called when built with COPTS=-O0,
sprinkle `__always_inline' to make _mcount() be generated as a single function.
 1.11 14-Aug-2021  ryo Improved the performance of kernel profiling on MULTIPROCESSOR, and possible to get profiling data for each CPU.

In the current implementation, locks are acquired at the entrance of the mcount
internal function, so the higher the number of cores, the more lock conflict
occurs, making profiling performance in a MULTIPROCESSOR environment unusable
and slow. Profiling buffers has been changed to be reserved for each CPU,
improving profiling performance in MP by several to several dozen times.

- Eliminated cpu_simple_lock in mcount internal function, using per-CPU buffers.
- Add ci_gmon member to struct cpu_info of each MP arch.
- Add kern.profiling.percpu node in sysctl tree.
- Add new -c <cpuid> option to kgmon(8) to specify the cpuid, like openbsd.
For compatibility, if the -c option is not specified, the entire system can be
operated as before, and the -p option will get the total profiling data for
all CPUs.
 1.10 16-Apr-2020  skrll Fix cur{lwp,cpu} and other bits for MODULES
 1.9 05-Dec-2019  skrll branches: 1.9.6;
Attempt to restore Utah $Hdr$
 1.8 05-Dec-2019  riastradh Only need one ci_onproc member.
 1.7 04-Dec-2019  skrll +ci_onproc
 1.6 01-Dec-2019  ad Fix false sharing problems with cpu_info. Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
the IPI bitmask and ci_want_resched.
 1.5 16-Apr-2019  skrll branches: 1.5.4;
Trailing whitespace
 1.4 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.3 25-Jan-2016  christos branches: 1.3.10; 1.3.16; 1.3.18;
Don't expose kernel structs to userland.
 1.2 06-Mar-2014  skrll branches: 1.2.4; 1.2.6; 1.2.10; 1.2.12;
Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.12.1 19-Mar-2016  skrll Sync with HEAD
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 06-Mar-2014  tls file cpu.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 06-Mar-2014  yamt file cpu.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 06-Mar-2014  rmind file cpu.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3.18.3 21-Apr-2020  martin Sync with HEAD
 1.3.18.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.3.18.1 10-Jun-2019  christos Sync with HEAD
 1.3.16.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.10.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1859):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
(applied also to sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/a9_mpsubr.S,
sys/arch/arm/cortex/cortex_init.S)
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/alpha/include/asm.h: revision 1.45
(applied to sys/arch/alpha/alpha/multiproc.s)
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.5.4.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1676):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284
(all via patch)

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.9.6.1 20-Apr-2020  bouyer Sync with HEAD
 1.12.4.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #264):

sys/arch/ia64/ia64/vm_machdep.c: revision 1.18
sys/arch/powerpc/powerpc/locore_subr.S: revision 1.67
sys/arch/aarch64/aarch64/locore.S: revision 1.91
sys/arch/mips/include/asm.h: revision 1.74
sys/arch/hppa/include/cpu.h: revision 1.13
sys/arch/arm/arm/armv6_start.S: revision 1.38
sys/arch/evbmips/ingenic/cpu_startup.S: revision 1.2
sys/arch/mips/mips/locore.S: revision 1.229
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.40
sys/arch/alpha/include/asm.h: revision 1.45
sys/arch/sparc64/sparc64/locore.s: revision 1.432
sys/arch/vax/vax/subr.S: revision 1.42
sys/arch/mips/mips/locore_mips3.S: revision 1.116
sys/arch/riscv/riscv/cpu_switch.S: revision 1.3
sys/arch/ia64/ia64/machdep.c: revision 1.44
sys/arch/arm/arm32/cpuswitch.S: revision 1.106
sys/arch/sparc/sparc/locore.s: revision 1.284

aarch64: Add missing barriers in cpu_switchto.
Details in comments.

Note: This is a conservative change that inserts a barrier where
there was a comment saying none is needed, which is probably correct.
The goal of this change is to systematically add barriers to be
confident in correctness; subsequent changes may remove some bariers,
as an optimization, with an explanation of why each barrier is not
needed.

PR kern/57240

alpha: Add missing barriers in cpu_switchto.
Details in comments.

arm32: Add missing barriers in cpu_switchto.
Details in comments.

hppa: Add missing barriers in cpu_switchto.
Not sure hppa has ever had working MULTIPROCESSOR, so maybe no
pullups needed?

ia64: Add missing barriers in cpu_switchto.
(ia64 has never really worked, so no pullups needed, right?)

mips: Add missing barriers in cpu_switchto.
Details in comments.

powerpc: Add missing barriers in cpu_switchto.
Details in comments.

riscv: Add missing barriers in cpu_switchto.
Details in comments.

sparc: Add missing barriers in cpu_switchto.

sparc64: Add missing barriers in cpu_switchto.
Details in comments.

vax: Note where cpu_switchto needs barriers.

Not sure vax has ever had working MULTIPROCESSOR, though, and I'm not
even sure how to spell store-before-load barriers on VAX, so no
functional change for now.
 1.17 21-May-2012  skrll Provide hppa_{enable,disable}_irq
 1.16 03-Apr-2012  skrll Kill cpu_gethpa by using the HPA stored in the cpu_info structure.
 1.15 04-Feb-2012  skrll G/C unused [fp]dcache_small.

OK riz@
 1.14 29-Nov-2009  skrll branches: 1.14.12; 1.14.16;
Add lci to get coherence index for an address.
 1.13 29-Nov-2009  skrll KNF
 1.12 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.11 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.10 18-Oct-2007  skrll branches: 1.10.20; 1.10.28; 1.10.34;
Remove get_psw/set_psw - they're not needed and can cause problems.
 1.9 07-Apr-2007  skrll branches: 1.9.12; 1.9.14; 1.9.18;
de-__P() and whitespace.
 1.8 27-Aug-2006  skrll branches: 1.8.6; 1.8.8; 1.8.12; 1.8.14; 1.8.18;
Pull across OpenBSD cpufunc.h:1.27 (ignore the typo)

revision 1.27
date: 2005/04/07 00:19:28; author: mickey; state: Exp; lines: +3 -3
put a memmory barrier onto the sync_caches()
 1.7 28-Dec-2005  perry branches: 1.7.4; 1.7.8;
inline -> __inline
 1.6 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 31-Jan-2005  jkunz branches: 1.4.6;
Import mfcpu() from OpenBSD, needed by power switch code.
 1.3 26-Aug-2004  jkunz branches: 1.3.4; 1.3.6;
Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
 1.2 19-Aug-2002  fredette branches: 1.2.6;
Cleaned up BTLB support. There are no longer BTLB function pointers
in struct hppa_cpu_info or anywhere else, now there are just hppa_btlb_*
functions. Added support for machines with split I/D and variable-range
BTLBs. Added support for purging BTLB entries.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file cpufunc.h was added on branch gehenna-devsw on 2002-07-14 17:47:20 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file cpufunc.h was added on branch kqueue on 2002-06-23 17:37:07 +0000
 1.2.6.2 04-Feb-2005  skrll Sync with HEAD.
 1.2.6.1 03-Sep-2004  skrll Sync with HEAD
 1.3.6.1 12-Feb-2005  yamt sync with head.
 1.3.4.1 29-Apr-2005  kent sync with -current
 1.4.6.4 27-Oct-2007  yamt sync with head.
 1.4.6.3 03-Sep-2007  yamt sync with head.
 1.4.6.2 30-Dec-2006  yamt sync with head.
 1.4.6.1 21-Jun-2006  yamt sync with head.
 1.7.8.1 03-Sep-2006  yamt sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.18.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.8.14.1 11-Jul-2007  mjf Sync with head.
 1.8.12.2 23-Oct-2007  ad Sync with head.
 1.8.12.1 10-Apr-2007  ad Sync with head.
 1.8.8.1 15-Apr-2007  yamt sync with head.
 1.8.6.1 24-Oct-2007  xtraeme Pull up following revision(s) (requested by skrll in ticket #939):
sys/arch/hppa/include/cpufunc.h: revision 1.10

Remove get_psw/set_psw - they're not needed and can cause problems.
 1.9.18.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.14.1 06-Nov-2007  matt sync with HEAD
 1.9.12.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.10.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.28.1 27-Oct-2008  skrll Commit work in progress.
 1.10.20.2 11-Mar-2010  yamt sync with head
 1.10.20.1 04-May-2009  yamt sync with head.
 1.14.16.3 02-Jun-2012  mrg sync to latest -current.
 1.14.16.2 05-Apr-2012  mrg sync to latest -current.
 1.14.16.1 18-Feb-2012  mrg merge to -current.
 1.14.12.2 23-May-2012  yamt sync with head.
 1.14.12.1 17-Apr-2012  yamt sync with head
 1.15 03-Sep-2023  andvar remove (db_addr_t) cast in hppa PC_REGS(regs) definition.
rename tf_hptm to tf_cr24 in kgdb_hppa.c.
This name was lost from trapframe (frame.h) in v1.8 and restored as tf_cr24 in v1.12.

Fixes KGDB enabled build for hppa.
 1.14 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.13 11-Jan-2016  skrll PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ?

Correct the test for rfir and add one for rfi while I'm here.
 1.12 18-Jan-2012  skrll branches: 1.12.2; 1.12.6; 1.12.22; 1.12.24; 1.12.26;
Support crash(8) on hppa.
 1.11 26-May-2011  joerg branches: 1.11.4; 1.11.8;
Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD.
 1.10 14-Jan-2011  rmind branches: 1.10.2;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.9 02-Mar-2010  skrll branches: 1.9.2;
Add a "mach frame" command to hppa ddb.
 1.8 03-Nov-2009  snj branches: 1.8.2;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.7 07-Apr-2007  skrll branches: 1.7.38;
Add ldcw as a store instruction. From OpenBSD.
 1.6 07-Apr-2007  skrll de-__P()
 1.5 01-Apr-2006  cherry branches: 1.5.14; 1.5.18; 1.5.20;
closes: PR kern/32359

modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.

Patch from cherry@mahiti.org
 1.4 16-Feb-2006  perry branches: 1.4.2; 1.4.4; 1.4.6;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.3 24-Dec-2005  perry branches: 1.3.2; 1.3.4; 1.3.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.2 29-Apr-2003  scw branches: 1.2.18;
Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file db_machdep.h was added on branch gehenna-devsw on 2002-07-14 17:47:20 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file db_machdep.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.2.18.2 03-Sep-2007  yamt sync with head.
 1.2.18.1 21-Jun-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3.2.1 18-Feb-2006  yamt sync with head.
 1.4.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.2.1 11-Apr-2006  yamt sync with head
 1.5.20.1 11-Jul-2007  mjf Sync with head.
 1.5.18.1 10-Apr-2007  ad Sync with head.
 1.5.14.1 15-Apr-2007  yamt sync with head.
 1.7.38.1 11-Mar-2010  yamt sync with head
 1.8.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9.2.2 31-May-2011  rmind sync with head
 1.9.2.1 05-Mar-2011  rmind sync with head
 1.10.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.11.8.1 18-Feb-2012  mrg merge to -current.
 1.11.4.1 17-Apr-2012  yamt sync with head
 1.12.26.1 12-Jan-2016  snj Pull up following revision(s) (requested by skrll in ticket #1072):
sys/arch/hppa/include/db_machdep.h: revision 1.13
PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ?
Correct the test for rfir and add one for rfi while I'm here.
 1.12.24.1 19-Mar-2016  skrll Sync with HEAD
 1.12.22.1 12-Jan-2016  snj Pull up following revision(s) (requested by skrll in ticket #1072):
sys/arch/hppa/include/db_machdep.h: revision 1.13
PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ?
Correct the test for rfir and add one for rfi while I'm here.
 1.12.6.1 03-Dec-2017  jdolecek update from HEAD
 1.12.2.1 13-Jul-2016  snj Pull up following revision(s) (requested by skrll in ticket #1360):
sys/arch/hppa/include/db_machdep.h: revision 1.13
PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ?
Correct the test for rfir and add one for rfi while I'm here.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file disklabel.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file disklabel.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file disklabel.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3 31-Mar-2014  christos branches: 1.3.4; 1.3.6; 1.3.10;
fix eisa_intr_string
 1.2 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.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.3.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.10.1 31-Mar-2014  tls file eisa_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.3.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.6.1 31-Mar-2014  yamt file eisa_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.3.4.2 18-May-2014  rmind sync with head
 1.3.4.1 31-Mar-2014  rmind file eisa_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.4 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.3 30-May-2009  skrll branches: 1.3.22;
Add TLS relocation definitions.
 1.2 19-May-2009  skrll Whitespace.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.1 20-Jun-2009  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file elf_machdep.h was added on branch gehenna-devsw on 2002-07-14 17:47:21 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file elf_machdep.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.3.22.1 03-Dec-2017  jdolecek update from HEAD
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file endian.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file endian.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file endian.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file endian_machdep.h was added on branch gehenna-devsw on 2002-07-14 17:47:22 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file endian_machdep.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.3 16-Apr-2019  skrll Trailing whitespace
 1.2 10-Dec-2002  thorpej branches: 1.2.198;
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file exec.h was added on branch gehenna-devsw on 2002-07-14 17:47:22 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file exec.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.2.198.1 10-Jun-2019  christos Sync with HEAD
 1.2 13-Jan-2015  martin branches: 1.2.2; 1.2.4; 1.2.20;
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
 1.1 27-Dec-2014  martin fenv(3) support for hppa
 1.2.20.2 03-Dec-2017  jdolecek update from HEAD
 1.2.20.1 13-Jan-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:16 +0000
 1.2.4.2 06-Apr-2015  skrll Sync with HEAD
 1.2.4.1 13-Jan-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-04-06 15:17:57 +0000
 1.2.2.2 20-Jan-2015  snj Pull up following revision(s) (requested by martin in ticket #416):
distrib/sets/lists/comp/md.hppa: revision 1.3
include/fenv.h: revision 1.13 via patch
lib/libm/Makefile: revision 1.168
lib/libm/arch/hppa/fenv.c: revisions 1.1, 1.2
sys/arch/hppa/include/Makefile: revision 1.12
sys/arch/hppa/include/fenv.h: revisions 1.1, 1.2
sys/arch/hppa/include/ieeefp.h: revisions 1.5-1.7
tests/lib/libm/Makefile: revision 1.29 via patch
fenv(3) support for hppa
--
use unsigned over uint32_t so that this file works without stdint.h
being included before hand.
fixes mknative-gcc problems, and likely others.
--
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
--
Simplify, now that rounding mode defines match the hardware bits.
 1.2.2.1 13-Jan-2015  snj file fenv.h was added on branch netbsd-7 on 2015-01-20 20:57:24 +0000
 1.9 30-Oct-2024  riastradh Sprinkle <sys/featuretest.h> where _*_SOURCE macros are consulted.

Otherwise, the feature tests might come out wrong. For example,
header files that check for _NETBSD_SOURCE won't get the default when
no other _*_SOURCE macros are defined; header files that check for
_POSIX_C_SOURCE might miss _XOPEN_SOURCE, which is supposed to imply
a corresponding _POSIX_C_SOURCE.

PR lib/58752: various header files test _*_SOURCE macros but don't
include sys/featuretest.h
 1.8 11-Jul-2011  matt branches: 1.8.90;
Fix FLT_* and DBL_* redefinition problem.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.5 30-Oct-2003  kleink It turns out the hppa ABI we're using does not support an extended-
precision type, so drop the library support for now but leave in place
(#ifdef _LP64) the header definitions.
 1.4 23-Oct-2003  kleink * Move the definitions for types other than single-precision and double-
precision back to machine-dependent headers. C99 has no strict
requirement which, if any, extended-precision type `long double' must
match, and even between 80-bit formats there are differences in
implementation (m68k vs. x86).
* On arm, consider __VFP_FP__.
 1.3 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.2 19-Apr-2003  christos branches: 1.2.2;
PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file float.h was added on branch gehenna-devsw on 2002-07-14 17:47:23 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file float.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.90.1 02-Aug-2025  perseant Sync with HEAD
 1.12 22-Jan-2011  skrll Save CR24 and CR27 and report in ddb.
 1.11 30-Mar-2010  skrll branches: 1.11.2; 1.11.4;
Whitespace.
 1.10 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.9 03-Nov-2009  snj branches: 1.9.2; 1.9.4;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.8 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.7 22-Dec-2007  skrll branches: 1.7.10; 1.7.18; 1.7.24;
Cast the argument to HPPA_FRAME_ROUND to uintptr_t
 1.6 18-Nov-2007  skrll branches: 1.6.2; 1.6.6;
Typo in comment. From OpenBSD.
 1.5 13-Nov-2007  skrll No need for reg.h here.
 1.4 07-Apr-2007  skrll branches: 1.4.12; 1.4.14; 1.4.18; 1.4.20;
Typo. From OpenBSD.
 1.3 11-Dec-2005  christos branches: 1.3.26; 1.3.30; 1.3.32;
merge ktrace-lwp.
 1.2 18-Jul-2004  chs branches: 1.2.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file frame.h was added on branch gehenna-devsw on 2002-07-14 17:47:23 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file frame.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.2.12.4 21-Jan-2008  yamt sync with head
 1.2.12.3 07-Dec-2007  yamt sync with head
 1.2.12.2 15-Nov-2007  yamt sync with head.
 1.2.12.1 03-Sep-2007  yamt sync with head.
 1.3.32.1 11-Jul-2007  mjf Sync with head.
 1.3.30.2 03-Dec-2007  ad Sync with HEAD.
 1.3.30.1 10-Apr-2007  ad Sync with head.
 1.3.26.1 15-Apr-2007  yamt sync with head.
 1.4.20.2 27-Dec-2007  mjf Sync with HEAD.
 1.4.20.1 19-Nov-2007  mjf Sync with HEAD.
 1.4.18.1 18-Nov-2007  bouyer Sync with HEAD
 1.4.14.1 09-Jan-2008  matt sync with HEAD
 1.4.12.2 21-Nov-2007  joerg Sync with HEAD.
 1.4.12.1 14-Nov-2007  joerg Sync with HEAD.
 1.6.6.1 02-Jan-2008  bouyer Sync with HEAD
 1.6.2.1 26-Dec-2007  ad Sync with head.
 1.7.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.18.1 27-Oct-2008  skrll Commit work in progress.
 1.7.10.3 11-Aug-2010  yamt sync with head.
 1.7.10.2 11-Mar-2010  yamt sync with head
 1.7.10.1 04-May-2009  yamt sync with head.
 1.9.4.2 05-Mar-2011  rmind sync with head
 1.9.4.1 30-May-2010  rmind sync with head
 1.9.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.11.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file hil_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file hil_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file hil_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.14 31-Jan-2014  matt Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
 1.13 31-Jan-2014  matt Add inclusion protection.
Convert to ieee_ext to use uint64_t
Format uses implicit NBIT
 1.12 10-Jul-2011  matt branches: 1.12.2; 1.12.12; 1.12.16;
Add defines for extu_frac[ln]m
 1.11 20-Sep-2010  christos cargo cult the x86 changes.
 1.10 04-Feb-2007  christos branches: 1.10.48; 1.10.68; 1.10.70;
make this gdtoa friendly.
 1.9 11-Dec-2005  christos branches: 1.9.20; 1.9.24;
merge ktrace-lwp.
 1.8 15-Apr-2005  kleink branches: 1.8.2;
Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
 1.7 30-Oct-2003  kleink branches: 1.7.8; 1.7.14;
It turns out the hppa ABI we're using does not support an extended-
precision type, so drop the library support for now but leave in place
(#ifdef _LP64) the header definitions.
 1.6 27-Oct-2003  kleink Err, rename some members added in previous to make them reflect their
semantics better.
 1.5 26-Oct-2003  kleink For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.
 1.4 26-Oct-2003  kleink Use <sys/ieee754.h> where applicable.
 1.3 26-Oct-2003  kleink Rip out E80 format definitions which are neither "notyet", nor going to
happen.
 1.2 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.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file ieee.h was added on branch gehenna-devsw on 2002-07-14 17:47:24 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file ieee.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.7.14.1 19-Apr-2005  tron Pull up revision 1.8 (requested by kleink in ticket #163):
Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.
IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.8.2.1 26-Feb-2007  yamt sync with head.
 1.9.24.1 07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.9.20.1 09-Feb-2007  ad Sync with HEAD.
 1.10.70.1 05-Mar-2011  rmind sync with head
 1.10.68.1 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.10.48.1 09-Oct-2010  yamt sync with head
 1.12.16.1 18-May-2014  rmind sync with head
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 16-Apr-2019  skrll Trailing whitespace
 1.7 13-Jan-2015  martin branches: 1.7.18;
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
 1.6 12-Jan-2015  mrg use unsigned over uint32_t so that this file works without stdint.h
being included before hand.

fixes mknative-gcc problems, and likely others.
 1.5 27-Dec-2014  martin fenv(3) support for hppa
 1.4 05-Aug-2008  matt branches: 1.4.38; 1.4.56; 1.4.58;
Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones. Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
 1.3 11-Dec-2005  christos branches: 1.3.74; 1.3.78; 1.3.80; 1.3.84;
merge ktrace-lwp.
 1.2 24-Jul-2004  chs FPU fixes and improvements, adapted from openbsd:
- handle exceptions correctly
- emulation of unimplemented instructions (eg. on PA-7300LC)
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file ieeefp.h was added on branch gehenna-devsw on 2002-07-14 17:47:24 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file ieeefp.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.3.84.1 19-Oct-2008  haad Sync with HEAD.
 1.3.80.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.3.74.1 28-Sep-2008  mjf Sync with HEAD.
 1.4.58.1 06-Apr-2015  skrll Sync with HEAD
 1.4.56.1 20-Jan-2015  snj Pull up following revision(s) (requested by martin in ticket #416):
distrib/sets/lists/comp/md.hppa: revision 1.3
include/fenv.h: revision 1.13 via patch
lib/libm/Makefile: revision 1.168
lib/libm/arch/hppa/fenv.c: revisions 1.1, 1.2
sys/arch/hppa/include/Makefile: revision 1.12
sys/arch/hppa/include/fenv.h: revisions 1.1, 1.2
sys/arch/hppa/include/ieeefp.h: revisions 1.5-1.7
tests/lib/libm/Makefile: revision 1.29 via patch
fenv(3) support for hppa
--
use unsigned over uint32_t so that this file works without stdint.h
being included before hand.
fixes mknative-gcc problems, and likely others.
--
Properly separate fenv.h and ieeefp.h by moving all fenv defines
over to the former.
Now that they are decoupled, make rounding modes match the hardware bits.
--
Simplify, now that rounding mode defines match the hardware bits.
 1.4.38.1 03-Dec-2017  jdolecek update from HEAD
 1.7.18.1 10-Jun-2019  christos Sync with HEAD
 1.3 29-May-2010  tnozaki fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
 1.2 28-Apr-2008  martin branches: 1.2.20; 1.2.22;
Remove clause 3 and 4 from TNF licenses
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112; 1.1.114; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.2 11-Aug-2010  yamt sync with head.
 1.1.116.1 16-May-2008  yamt sync with head.
 1.1.114.1 18-May-2008  yamt sync with head.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file int_const.h was added on branch gehenna-devsw on 2002-07-14 17:47:25 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file int_const.h was added on branch kqueue on 2002-06-23 17:37:08 +0000
 1.2.22.1 30-May-2010  rmind sync with head
 1.2.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3 13-Aug-2014  matt include <sys/common_int_fmtio.h> if __INTPTR_FMTd__ is defined
 1.2 28-Apr-2008  martin branches: 1.2.44;
Remove clause 3 and 4 from TNF licenses
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112; 1.1.114; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.1 16-May-2008  yamt sync with head.
 1.1.114.1 18-May-2008  yamt sync with head.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file int_fmtio.h was added on branch gehenna-devsw on 2002-07-14 17:47:25 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file int_fmtio.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.44.1 03-Dec-2017  jdolecek update from HEAD
 1.7 16-Apr-2019  skrll Trailing whitespace
 1.6 28-Apr-2008  martin branches: 1.6.88;
Remove clause 3 and 4 from TNF licenses
 1.5 17-Oct-2007  garbled branches: 1.5.16; 1.5.18; 1.5.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.4 31-Aug-2007  drochner Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
 1.3 11-Dec-2005  christos branches: 1.3.30; 1.3.38; 1.3.44; 1.3.48; 1.3.50;
merge ktrace-lwp.
 1.2 08-May-2004  kleink branches: 1.2.12;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file int_limits.h was added on branch gehenna-devsw on 2002-07-14 17:47:25 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file int_limits.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.12.1 03-Sep-2007  yamt sync with head.
 1.3.50.1 06-Nov-2007  matt sync with HEAD
 1.3.48.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.3.44.1 03-Sep-2007  skrll Sync with HEAD.
 1.3.38.1 03-Oct-2007  garbled Sync with HEAD
 1.3.30.1 09-Oct-2007  ad Sync with head.
 1.5.20.1 16-May-2008  yamt sync with head.
 1.5.18.1 18-May-2008  yamt sync with head.
 1.5.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.88.1 10-Jun-2019  christos Sync with HEAD
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 24-Dec-2005  perry branches: 1.2.74; 1.2.76; 1.2.78;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.26.1 21-Jun-2006  yamt sync with head.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file int_mwgwtypes.h was added on branch gehenna-devsw on 2002-07-14 17:47:26 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file int_mwgwtypes.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 25-May-2005  kleink branches: 1.3.2;
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.2 07-Aug-2003  agc branches: 1.2.6; 1.2.14;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file int_types.h was added on branch gehenna-devsw on 2002-07-14 17:47:26 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file int_types.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.14.1 28-May-2005  tron Pull up revision 1.3 (requested by klein in ticket #346):
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.2.6.1 29-May-2005  riz Pull up revision 1.3 (requested by kleink in ticket #1555):
Include <sys/cdefs.h> for __signed; related to lib/30072.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.4 12-Jul-2023  mrg 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.
 1.3 11-Jul-2023  riastradh hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
 1.2 26-Feb-2022  macallan branches: 1.2.4;
unmask interrupt bits leading to other interrupt registers
now hardware interrupts actually fire instead of being found pending by the
timer interrupt
with this SCSI throughput on my c360 is what you'd expect from an UW esiop
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file intr.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file intr.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file intr.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.4.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.2 19-May-2014  rmind branches: 1.2.2; 1.2.6;
Implement MI IPI interface with cross-call support.
 1.1 24-Feb-2014  skrll branches: 1.1.2; 1.1.4;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file intrdefs.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 19-May-2014  tls file intrdefs.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.2.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.1 19-May-2014  yamt file intrdefs.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file iomod.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file iomod.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file iomod.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 18-Oct-2016  jdolecek add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12; 1.1.16;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.16.1 04-Nov-2016  pgoyette Sync with HEAD
 1.1.12.1 05-Dec-2016  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file isa_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file isa_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file isa_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.1 11-Mar-2010  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file kcore.h was added on branch gehenna-devsw on 2002-07-14 17:47:27 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file kcore.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.17 16-Apr-2019  skrll Trailing whitespace
 1.16 21-Jan-2019  dholland Fix wrong scoping of {U,}LLONG_MAX. More cases, not just amd64.
PR 53298 from Roberto E. Vargas Caballero.
 1.15 11-Apr-2013  christos branches: 1.15.34; 1.15.36;
add missing SSIZE_MIN
 1.14 28-Mar-2012  christos branches: 1.14.2;
- Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
 1.13 11-Jul-2011  matt branches: 1.13.2; 1.13.6;
Fix FLT_* and DBL_* redefinition problem.
 1.12 07-Jun-2010  tnozaki 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
prepareing for next libc major crunk.
4. bump libc minor version.
 1.11 13-Sep-2008  skrll branches: 1.11.14; 1.11.16;
Fix (U)LLONG_(MAX|MIN) defines.

From Jonathan Kollasch. Thanks.
 1.10 13-Sep-2008  skrll Swap max/min in comments to match symbols.
 1.9 13-Sep-2008  skrll Multiple inclusion protection.
 1.8 17-Oct-2007  garbled branches: 1.8.16; 1.8.20; 1.8.22; 1.8.26;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.7 31-Aug-2007  drochner Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
 1.6 19-Oct-2006  he branches: 1.6.8; 1.6.16; 1.6.22; 1.6.26; 1.6.28;
Convert to using hexadecimal literals for the type limits.
Also, add a trailing 'U' to the unsigned limits.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 07-Aug-2003  agc branches: 1.4.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.3 28-Apr-2003  bjh21 branches: 1.3.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.2 23-Jun-2002  perry branches: 1.2.2; 1.2.4;
Remove (completely unused) definition of CLK_TCK. Nothing in the
kernel uses it, it is protected by _KERNEL, and it conflicts with the
definition in userland.
 1.1 05-Jun-2002  fredette Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.2.4.3 16-Jul-2002  gehenna catch up with -current.
 1.2.4.2 14-Jul-2002  gehenna catch up with -current.
 1.2.4.1 23-Jun-2002  gehenna file limits.h was added on branch gehenna-devsw on 2002-07-14 17:47:27 +0000
 1.2.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 23-Jun-2002  jdolecek file limits.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.2 03-Sep-2007  yamt sync with head.
 1.4.16.1 30-Dec-2006  yamt sync with head.
 1.5.22.1 22-Oct-2006  yamt sync with head
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.6.28.1 06-Nov-2007  matt sync with HEAD
 1.6.26.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.6.22.1 03-Sep-2007  skrll Sync with HEAD.
 1.6.16.1 03-Oct-2007  garbled Sync with HEAD
 1.6.8.1 09-Oct-2007  ad Sync with head.
 1.8.26.1 19-Oct-2008  haad Sync with HEAD.
 1.8.22.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.8.20.2 11-Aug-2010  yamt sync with head.
 1.8.20.1 04-May-2009  yamt sync with head.
 1.8.16.1 28-Sep-2008  mjf Sync with HEAD.
 1.11.16.1 03-Jul-2010  rmind sync with head
 1.11.14.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.13.6.1 05-Apr-2012  mrg sync to latest -current.
 1.13.2.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.2.1 17-Apr-2012  yamt sync with head
 1.14.2.1 23-Jun-2013  tls resync from head
 1.15.36.1 10-Jun-2019  christos Sync with HEAD
 1.15.34.1 26-Jan-2019  pgoyette Sync with HEAD
 1.2 06-Aug-2014  joerg branches: 1.2.4;
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.1 24-Feb-2014  skrll branches: 1.1.2; 1.1.4; 1.1.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file loadfile_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file loadfile_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.4.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 06-Aug-2014  tls file loadfile_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.24 13-Feb-2022  riastradh hppa: __cpu_simple_lock membar audit.

ok skrll
 1.23 12-Feb-2022  riastradh __cpu_simple_lock(9): Omit needless barriers in init.

It is, and always has been, the caller's responsibility to ensure the
lock is initialized before it can be used -- otherwise the memory
could hold garbage; it is nonsensical to even attempt locking
operations on it before initialization.

So there's no need to issue explicit barriers here. The barrier
seems to have been introduced in sys/arch/alpha/alpha/lock_machdep.c
rev. 1.1 (since moved to inline asm in alpha/include/lock.h) and then
copied & pasted into several other architectures.
 1.22 29-Nov-2019  riastradh Nix mb_* on hppa.
 1.21 16-Apr-2019  skrll Trailing whitespace
 1.20 17-Sep-2017  christos branches: 1.20.4;
more const.
 1.19 15-Jan-2017  christos undo paren change
 1.18 15-Jan-2017  christos more types for constants
 1.17 14-Jan-2017  christos fix constant types
 1.16 28-Apr-2008  martin branches: 1.16.44; 1.16.64; 1.16.68;
Remove clause 3 and 4 from TNF licenses
 1.15 13-Nov-2007  skrll branches: 1.15.14; 1.15.16; 1.15.18;
Don't use structure copy in __cpu_simple_lock_init. Set the array elements
to __SIMPLELOCK_RAW_UNLOCKED instead.
 1.14 17-Oct-2007  garbled branches: 1.14.2;
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.13 15-Sep-2007  he branches: 1.13.4;
Fix build problem: ensure uintptr_t is declared by including <sys/stdint.h>.
OKed by skrll.
 1.12 10-Sep-2007  skrll Merge nick-csl-alignment.
 1.11 09-Feb-2007  ad branches: 1.11.6; 1.11.14; 1.11.18; 1.11.22; 1.11.24;
Merge newlock2 to head.
 1.10 22-Sep-2006  skrll Create real lock primatives using as little asm as possible.

It's not used anywhere, but it's better committed than on any of my HDs.
 1.9 28-Dec-2005  perry branches: 1.9.20; 1.9.22;
inline -> __inline
 1.8 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 07-Aug-2004  chs branches: 1.6.12;
stub out the ldcw stuff for now, since gcc -O2 chokes on it.
 1.5 01-Nov-2003  matt Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
 1.4 06-Oct-2003  matt Change headers to comply with the new toolchain changes.
 1.3 20-Sep-2003  matt Use #ifdef _KERNEL_OPT around #include "opt_XXX.h"
 1.2 23-Jun-2003  martin branches: 1.2.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file lock.h was added on branch gehenna-devsw on 2002-07-14 17:47:27 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file lock.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.5 15-Nov-2007  yamt sync with head.
 1.6.12.4 27-Oct-2007  yamt sync with head.
 1.6.12.3 26-Feb-2007  yamt sync with head.
 1.6.12.2 30-Dec-2006  yamt sync with head.
 1.6.12.1 21-Jun-2006  yamt sync with head.
 1.9.22.1 22-Oct-2006  yamt sync with head
 1.9.20.2 29-Jan-2007  ad Make hp700 compile.
 1.9.20.1 18-Nov-2006  ad Sync with head.
 1.11.24.2 09-Jan-2008  matt sync with HEAD
 1.11.24.1 06-Nov-2007  matt sync with HEAD
 1.11.22.2 14-Nov-2007  joerg Sync with HEAD.
 1.11.22.1 02-Oct-2007  joerg Sync with HEAD.
 1.11.18.2 23-Aug-2007  skrll Sprinkle volatile.
 1.11.18.1 18-Jul-2007  skrll Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.
 1.11.14.1 03-Oct-2007  garbled Sync with HEAD
 1.11.6.2 03-Dec-2007  ad Sync with HEAD.
 1.11.6.1 09-Oct-2007  ad Sync with head.
 1.13.4.1 13-Nov-2007  bouyer Sync with HEAD
 1.14.2.1 19-Nov-2007  mjf Sync with HEAD.
 1.15.18.1 16-May-2008  yamt sync with head.
 1.15.16.1 18-May-2008  yamt sync with head.
 1.15.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.68.1 20-Mar-2017  pgoyette Sync with HEAD
 1.16.64.1 05-Feb-2017  skrll Sync with HEAD
 1.16.44.1 03-Dec-2017  jdolecek update from HEAD
 1.20.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20.4.1 10-Jun-2019  christos Sync with HEAD
 1.2 04-Nov-2024  christos Undo previous lwp.h change.
 1.1 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 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:42 +0000
 1.8 31-Jan-2014  matt Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
 1.7 11-Dec-2005  christos branches: 1.7.112; 1.7.122; 1.7.128;
merge ktrace-lwp.
 1.6 30-Oct-2003  kleink It turns out the hppa ABI we're using does not support an extended-
precision type, so drop the library support for now but leave in place
(#ifdef _LP64) the header definitions.
 1.5 28-Oct-2003  kleink #define __HAVE_LONG_DOUBLE on platforms which implement a distinct
`long double' type.
 1.4 22-Oct-2003  kleink G/c the local declaration of __nanf; handling of this (conditional on
__HAVE_NANF) was moved to <math.h> some time ago.
 1.3 06-Oct-2003  matt Change headers to comply with the new toolchain changes.
 1.2 28-Apr-2003  bjh21 branches: 1.2.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file math.h was added on branch gehenna-devsw on 2002-07-14 17:47:28 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file math.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.128.1 18-May-2014  rmind sync with head
 1.7.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.112.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.16 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.15 04-Nov-2024  christos Undo previous lwp.h change.
 1.14 03-Nov-2024  christos Split __lwp_getprivate_fast and __lwp_*tcb from mcontext.h into a separate
lwp.h file.
 1.13 18-May-2024  thorpej branches: 1.13.2;
Clean up the <sys/ucontext.h> <-> <machine/mcontext.h> interface up
a little:
- Define _UC_MD_BIT* constants for the available machine-dependent bits,
and use those constants to define the machine-dependent bits as well
as the machine-independent bits that have machine-dependent values.
- Explicitly generate an error if _UC_TLSBASE, _UC_SETSTACK, or
_UC_CLRSTACK are not defined by <machine/mcontext.h>.
 1.12 26-Jun-2022  skrll Decorate the HPPA signal trampoline with the appropriate .cfi
directives to allow exception unwind / backtrace across a signal
handler.
 1.11 27-Dec-2019  kamil Harmonize the namespace of fast TLS base pointer getter functions

Protect __lwp_getprivate_fast() with _RTLD_SOURCE, _LIBC_SOURCE and
__LIBPTHREAD_SOURCE__.

Include in this namespace <sys/tcl.h> and use __BEGIN_DECLS/__END_DECLS
for the sake of consistency.
 1.10 27-Feb-2018  kamil branches: 1.10.4;
Implement _UC_MACHINE_INTRV() for hppa

INTRV = integer return value
For hppa this is R28 alias _REG_RET0.
 1.9 15-Feb-2018  kamil Introduce _UC_MACHINE_FP() as a macro

_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.

Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.


For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).

For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:

./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM LOC_REG (79)

Once ia64 will mature, this should be revisited.

A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.


For the remaining CPUs, reuse standard register as defined in appropriate ABI.

The direct users of this macro are LLVM and GCC with Sanitizers.

Proposed on tech-userlevel@.

Sponsored by <The NetBSD Foundation>
 1.8 19-Feb-2014  skrll branches: 1.8.22;
Provide a genassym.cf in libc for hppa and use it.
 1.7 08-Dec-2011  skrll branches: 1.7.6; 1.7.10;
Track if we saved l_private in the mcontext and don't blindly restore it.

This fixes the tests in /usr/tests/lib/libc/setjmp/t_threadjmp
 1.6 25-Feb-2011  joerg branches: 1.6.4; 1.6.8;
Be nicer to software that insists on -ansi and use __inline.
 1.5 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.4 11-Dec-2005  christos branches: 1.4.100; 1.4.106; 1.4.108;
merge ktrace-lwp.
 1.3 18-Jul-2004  chs branches: 1.3.2;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.2 08-Oct-2003  thorpej Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
special handling on some platforms).
 1.1 31-Aug-2003  chs add some placeholders so we can at least build.
 1.3.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.3 05-Aug-2004  skrll Fix some merge mistakes.
 1.3.2.2 03-Aug-2004  skrll Sync with HEAD
 1.3.2.1 18-Jul-2004  skrll file mcontext.h was added on branch ktrace-lwp on 2004-08-03 10:35:37 +0000
 1.4.108.1 05-Mar-2011  bouyer Sync with HEAD
 1.4.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.4.100.1 05-Mar-2011  rmind sync with head
 1.6.8.1 18-Feb-2012  mrg merge to -current.
 1.6.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.1 17-Apr-2012  yamt sync with head
 1.7.10.1 18-May-2014  rmind sync with head
 1.7.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.22.3 21-Mar-2018  martin Pull up the following, requested by kamil in ticket #552:

external/gpl3/gcc{.old}/dist/libsanitizer/asan/asan_linux.cc 1.4
sys/arch/aarch64/include/mcontext.h 1.2
sys/arch/alpha/include/mcontext.h 1.9
sys/arch/amd64/include/mcontext.h 1.19
sys/arch/arm/include/mcontext.h 1.19
sys/arch/hppa/include/mcontext.h 1.9
sys/arch/i386/include/mcontext.h 1.14
sys/arch/ia64/include/mcontext.h 1.6
sys/arch/m68k/include/mcontext.h 1.10
sys/arch/mips/include/mcontext.h 1.22
sys/arch/or1k/include/mcontext.h 1.2
sys/arch/powerpc/include/mcontext.h 1.18
sys/arch/riscv/include/mcontext.h 1.5
sys/arch/sh3/include/mcontext.h 1.11
sys/arch/sparc/include/mcontext.h 1.14-1.17
sys/arch/sparc64/include/mcontext.h 1.10
sys/arch/vax/include/mcontext.h 1.9
tests/lib/libc/sys/Makefile 1.50
tests/lib/libc/sys/t_ucontext.c 1.2-1.5
sys/arch/hppa/include/mcontext.h 1.10
sys/arch/ia64/include/mcontext.h 1.7

- Introduce _UC_MACHINE_FP(). _UC_MACHINE_FP() is a helper
macro to extract from mcontext a frame pointer.
- Add new tests in lib/libc/sys/t_ucontext:
* ucontext_sp (testing _UC_MACHINE_SP)
* ucontext_fp (testing _UC_MACHINE_FP)
* ucontext_pc (testing _UC_MACHINE_PC)
* ucontext_intrv (testing _UC_MACHINE_INTRV)

Add a dummy implementation of _UC_MACHINE_INTRV() for ia64.

Implement _UC_MACHINE_INTRV() for hppa.

Make the t_ucontext.c test more portable.

We now have _UC_MACHINE_FP.
 1.8.22.2 26-Feb-2018  snj revert ticket 552, which broke the build
 1.8.22.1 25-Feb-2018  snj Pull up following revision(s) (requested by kamil in ticket #552):
sys/arch/aarch64/include/mcontext.h: 1.2
sys/arch/alpha/include/mcontext.h: 1.9
sys/arch/amd64/include/mcontext.h: 1.19
sys/arch/arm/include/mcontext.h: 1.19
sys/arch/hppa/include/mcontext.h: 1.9
sys/arch/i386/include/mcontext.h: 1.14
sys/arch/ia64/include/mcontext.h: 1.6
sys/arch/m68k/include/mcontext.h: 1.10
sys/arch/mips/include/mcontext.h: 1.22
sys/arch/or1k/include/mcontext.h: 1.2
sys/arch/powerpc/include/mcontext.h: 1.18
sys/arch/riscv/include/mcontext.h: 1.5
sys/arch/sh3/include/mcontext.h: 1.11
sys/arch/sparc/include/mcontext.h: 1.14-1.17
sys/arch/sparc64/include/mcontext.h: 1.10
sys/arch/vax/include/mcontext.h: 1.9
tests/lib/libc/sys/Makefile: 1.50
tests/lib/libc/sys/t_ucontext.c: 1.2
Introduce _UC_MACHINE_FP() as a macro
_UC_MACHINE_FP() is a helper macro to extract from mcontext a frame pointer.
Don't rely on this interface as a compiler might strip frame pointer or
optimize it making this interface unreliable.
For hppa assume a small frame context, for larger frames FP might be located
in a different register (4 instead of 3).
For ia64 there is no strict frame pointer, and registers might rotate.
Reuse 79 following:
./gcc/config/ia64/ia64.h:#define HARD_FRAME_POINTER_REGNUM LOC_REG (79)
Once ia64 will mature, this should be revisited.
A macro can encapsulate a real function for extracting Frame Pointer on
more complex CPUs / ABIs.
For the remaining CPUs, reuse standard register as defined in appropriate ABI.
The direct users of this macro are LLVM and GCC with Sanitizers.
Proposed on tech-userlevel@.
Sponsored by <The NetBSD Foundation>
--
Improve _UC_MACHINE_FP() for SPARC/SPARC64
Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.
Algorithm:
uptr *stk_ptr;
# if defined (__arch64__)
stk_ptr = (uptr *) (*sp + 2047);
# else
stk_ptr = (uptr *) *sp;
# endif
*bp = stk_ptr[15];
Noted by <mrg>
--
Make _UC_MACHINE_FP() compile again and fix it so that it does not add
the offset twice.
--
fix _UC_MACHINE32_FP() -- use 32 bit pointer value so that [15] is
the right offset. do this by using __greg32_t, which is only in
the sparc64 version, and these are only useful there, so move them.
--
Add new tests in lib/libc/sys/t_ucontext
New tests:
- ucontext_sp
- ucontext_fp
- ucontext_pc
- ucontext_intrv
They test respectively:
- _UC_MACHINE_SP
- _UC_MACHINE_FP
- _UC_MACHINE_PC
- _UC_MACHINE_INTRV
These tests attempt to access and print the values from ucontext, without
interpreting the values.
This is a follow up of the _UC_MACHINE_FP() introduction.
These tests use PRIxREGISTER, and require to be built with -D_KERNTYPES.
Sponsored by <The NetBSD Foundation>
 1.10.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.2.1 02-Aug-2025  perseant Sync with HEAD
 1.19 13-Jul-2023  mrg re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.
 1.18 12-Jul-2023  riastradh machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.
 1.17 12-Jul-2023  mrg 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.
 1.16 09-Jul-2023  riastradh machine/mutex.h: Sprinkle includes so this can be used by crash(8).

XXX pullup-10
 1.15 07-Jan-2020  ad branches: 1.15.26;
hppa has custom adaptive mutexes. Allow it to build again while not
reintroducing the main read of mtx_owner that I wanted to eliminate.
 1.14 29-Nov-2019  riastradh Nix mb_* on hppa.
 1.13 04-Oct-2017  christos branches: 1.13.4;
const me harder!
 1.12 24-Sep-2017  christos const me harder.
 1.11 16-Nov-2010  uebayasi branches: 1.11.18;
sys/mutex.h includes machine/intr.h via sys/intr.h, so no need here.
 1.10 14-Nov-2010  uebayasi Don't rely on global APIs from internal.
 1.9 28-Apr-2008  martin branches: 1.9.22;
Remove clause 3 and 4 from TNF licenses
 1.8 21-Nov-2007  yamt branches: 1.8.14; 1.8.16; 1.8.18;
make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
 1.7 17-Oct-2007  garbled branches: 1.7.2;
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.6 10-Sep-2007  skrll branches: 1.6.4;
Merge nick-csl-alignment.
 1.5 15-May-2007  skrll branches: 1.5.4; 1.5.8; 1.5.10;
Pull across #include file fix from yamt-idlelwp.
 1.4 15-Feb-2007  ad branches: 1.4.2; 1.4.4; 1.4.8; 1.4.10; 1.4.16;
Add MUTEX_CLEAR_WAITERS().
 1.3 10-Feb-2007  skrll Destroy a mutex correctly. That is, overright the owner and don't set
mtx_waiters.
 1.2 09-Feb-2007  ad Merge newlock2 to head.
 1.1 29-Jan-2007  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.6 06-Feb-2007  skrll First pass at lock stubs for hppa. They don't work yet.
 1.1.2.5 06-Feb-2007  skrll Fix MUTEX_UNOWNED_OR_SPIN
 1.1.2.4 02-Feb-2007  ad Fix declarations. Spotted by uebayasi.
 1.1.2.3 01-Feb-2007  ad Handle hppa weirdness.
 1.1.2.2 01-Feb-2007  ad Header file cleanup.
 1.1.2.1 29-Jan-2007  ad Make hp700 compile.
 1.4.16.2 03-Oct-2007  garbled Sync with HEAD
 1.4.16.1 22-May-2007  matt Update to HEAD.
 1.4.10.1 11-Jul-2007  mjf Sync with head.
 1.4.8.3 03-Dec-2007  ad Sync with HEAD.
 1.4.8.2 09-Oct-2007  ad Sync with head.
 1.4.8.1 27-May-2007  ad Sync with head.
 1.4.4.5 07-Dec-2007  yamt sync with head
 1.4.4.4 27-Oct-2007  yamt sync with head.
 1.4.4.3 03-Sep-2007  yamt sync with head.
 1.4.4.2 26-Feb-2007  yamt sync with head.
 1.4.4.1 15-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:43 +0000
 1.4.2.1 08-May-2007  skrll This file needs machine/lock.h so add it.
 1.5.10.2 09-Jan-2008  matt sync with HEAD
 1.5.10.1 06-Nov-2007  matt sync with HEAD
 1.5.8.2 21-Nov-2007  joerg Sync with HEAD.
 1.5.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.5.4.1 18-Jul-2007  skrll Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.
 1.6.4.1 21-Nov-2007  bouyer Sync with HEAD
 1.7.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.8.18.1 16-May-2008  yamt sync with head.
 1.8.16.1 18-May-2008  yamt sync with head.
 1.8.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.22.1 05-Mar-2011  rmind sync with head
 1.11.18.1 03-Dec-2017  jdolecek update from HEAD
 1.13.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15.26.1 09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

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

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

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

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

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

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

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

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

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

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

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

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

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

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

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

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

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

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

ddb: Cast pointer to uintptr_t first before db_expr_t.

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

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

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

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

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

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

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

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

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

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

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

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

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

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

fix hppa and vax builds.

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

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

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

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

re-fix hppa builds.

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

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

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

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

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

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

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

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

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

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

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

Note that fls32 is 1-based and returns 0 for x=0.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file nvm.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file nvm.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file nvm.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.31 20-Apr-2025  riastradh t_signal_and_sp: Add hppa support.

Fortunately, hppa -- which uses monster 64-byte(!) stack alignment --
looks good already.

PR kern/59327: user stack pointer is not aligned properly
 1.30 22-Mar-2022  macallan branches: 1.30.10;
bump MSGBUFSIZE
 1.29 31-May-2021  simonb Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
 1.28 08-May-2021  skrll KNF
 1.27 01-May-2020  isaki branches: 1.27.6;
Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used.
Otherwise the default value (currently 10 msec) defined in audio.c will
be used. This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block. Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).
But please don't be eager to make the default value shorter.

<machine/param.h> was discussed in source-changes-d. It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this. Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html
 1.26 21-Mar-2020  riastradh Revert another historic $Hdr$ collapse.
 1.25 05-Mar-2020  riastradh Revert "Include opt_diagnostic.h for DIAGNOSTIC."

This did not do what I thought it did. opt_diagnostic.h is only for
the unused _DIAGNOSTIC, which seems like an abortive attempt to
incrementally convert DIAGNOSTIC to an opt_*.h option rather than a
command-line option.
 1.24 05-Mar-2020  riastradh Include opt_diagnostic.h for DIAGNOSTIC.

...at least, in header files, which may not have already included
libkern.h.
 1.23 16-Apr-2019  skrll branches: 1.23.4;
Trailing whitespace
 1.22 07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.21 27-Oct-2015  mrg branches: 1.21.16; 1.21.18;
make sure MSGBUFSIZE can't expand strangely by using parens.
 1.20 24-Feb-2014  skrll branches: 1.20.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.19 10-Feb-2012  para branches: 1.19.6; 1.19.10;
proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system
 1.18 04-Feb-2012  para improve sizing of kmem_arena now that more allocations are made from it
don't enforce limits if not required

ok: riz@
 1.17 24-Jan-2012  christos Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
 1.16 20-Jan-2012  joerg Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.15 08-Feb-2010  joerg branches: 1.15.10; 1.15.14;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.14 17-Jan-2010  skrll branches: 1.14.2;
Simplify.
 1.13 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.12 10-Jan-2008  skrll branches: 1.12.10; 1.12.18; 1.12.24;
Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.11 02-Jan-2008  he Remove the #endif corresponding to the #ifdef _KERNEL removed in previous.
 1.10 31-Dec-2007  ad Remove COMPAT_HPUX.
 1.9 03-Mar-2007  skrll branches: 1.9.20; 1.9.26; 1.9.32;
Remove hppa_{round,trunc}_page.
 1.8 28-Aug-2006  yamt branches: 1.8.8;
- remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
ctod
dtoc
ctob
btoc
dbtob
btodb
 1.7 11-Dec-2005  christos branches: 1.7.4; 1.7.8;
merge ktrace-lwp.
 1.6 18-Jul-2004  chs branches: 1.6.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.5 20-Sep-2003  matt Use #ifdef _KERNEL_OPT around #include "opt_XXX.h"
 1.4 23-Jun-2003  martin branches: 1.4.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.3 28-Apr-2003  bjh21 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.2 01-Apr-2003  thorpej * Define PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK in <hppa/vmparam.h>,
not in <hppa/param.h>.
* Define NBPG in terms of PGSHIFT.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file param.h was added on branch gehenna-devsw on 2002-07-14 17:47:28 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file param.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.3 21-Jan-2008  yamt sync with head
 1.6.12.2 03-Sep-2007  yamt sync with head.
 1.6.12.1 30-Dec-2006  yamt sync with head.
 1.7.8.1 03-Sep-2006  yamt sync with head.
 1.7.4.1 09-Sep-2006  rpaulo sync with head
 1.8.8.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.32.3 11-Jan-2008  bouyer Sync with HEAD
 1.9.32.2 08-Jan-2008  bouyer Sync with HEAD
 1.9.32.1 02-Jan-2008  bouyer Sync with HEAD
 1.9.26.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.20.2 23-Mar-2008  matt sync with HEAD
 1.9.20.1 09-Jan-2008  matt sync with HEAD
 1.12.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.18.1 19-Feb-2009  skrll Fixup redzone stuff and enable it if DIAGNOSTIC.
 1.12.10.2 11-Mar-2010  yamt sync with head
 1.12.10.1 04-May-2009  yamt sync with head.
 1.14.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.15.14.1 18-Feb-2012  mrg merge to -current.
 1.15.10.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.10.1 17-Apr-2012  yamt sync with head
 1.19.10.1 18-May-2014  rmind sync with head
 1.19.6.2 03-Dec-2017  jdolecek update from HEAD
 1.19.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.21.18.1 10-Jun-2019  christos Sync with HEAD
 1.21.16.1 18-Jan-2019  pgoyette Synch with HEAD
 1.23.4.1 18-May-2020  martin Pull up following revision(s) (requested by isaki in ticket #911):

sys/dev/audio/audiodef.h: revision 1.13
sys/dev/audio/audiodef.h: revision 1.14
sys/arch/sparc/include/param.h: revision 1.74
sys/arch/evbarm/conf/GENERIC64: revision 1.148
sys/arch/sh3/include/param.h: revision 1.25
sys/arch/evbarm/conf/GENERIC: revision 1.75
sys/arch/m68k/include/param.h: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.564
sys/arch/hppa/include/param.h: revision 1.27
sys/dev/audio/audio.c: revision 1.68
sys/arch/vax/include/param.h: revision 1.63
sys/dev/audio/audio.c: revision 1.69

Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before). And remove the option from GENERIC.

- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.

Set AUDIO_BLK_MS 40 msec on other old(slow) architectures not only m68k.

Thanks tsutsui@ for comment about architecture choice.
And move it from audiodef.h to audio.c as suggested by joerg@.


Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used.

Otherwise the default value (currently 10 msec) defined in audio.c will
be used. This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block. Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).

But please don't be eager to make the default value shorter.
<machine/param.h> was discussed in source-changes-d. It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this. Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html
 1.27.6.2 17-Jun-2021  thorpej Sync w/ HEAD.
 1.27.6.1 13-May-2021  thorpej Sync with HEAD.
 1.30.10.1 02-Aug-2025  perseant Sync with HEAD
 1.10 16-Apr-2019  skrll Trailing whitespace
 1.9 16-Mar-2010  skrll branches: 1.9.60;
The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.8 03-Nov-2009  snj branches: 1.8.2; 1.8.4;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.7 24-May-2009  skrll u_intNN_t -> uintNN_t

"same" code before and after.
 1.6 18-Jan-2008  skrll branches: 1.6.10;
Adjust comments to fit <80 columns.
 1.5 10-Jan-2008  skrll Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.4 07-Apr-2007  skrll branches: 1.4.14; 1.4.20; 1.4.26;
Whitespace.
 1.3 11-Dec-2005  christos branches: 1.3.26; 1.3.30; 1.3.32;
merge ktrace-lwp.
 1.2 18-Jul-2004  chs branches: 1.2.12;
store the kernel stack pointer for a sleeping LWP in its PCB instead of
in its trapframe. this is needed for scheduler activations, so that we can
change the user stack pointer via the trapframe. from openbsd.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file pcb.h was added on branch gehenna-devsw on 2002-07-14 17:47:28 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file pcb.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.2.12.2 21-Jan-2008  yamt sync with head
 1.2.12.1 03-Sep-2007  yamt sync with head.
 1.3.32.1 11-Jul-2007  mjf Sync with head.
 1.3.30.1 10-Apr-2007  ad Sync with head.
 1.3.26.1 15-Apr-2007  yamt sync with head.
 1.4.26.2 19-Jan-2008  bouyer Sync with HEAD
 1.4.26.1 11-Jan-2008  bouyer Sync with HEAD
 1.4.20.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.14.1 23-Mar-2008  matt sync with HEAD
 1.6.10.3 11-Aug-2010  yamt sync with head.
 1.6.10.2 11-Mar-2010  yamt sync with head
 1.6.10.1 20-Jun-2009  yamt sync with head
 1.8.4.1 30-May-2010  rmind sync with head
 1.8.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9.60.1 10-Jun-2019  christos Sync with HEAD
 1.3 16-Aug-2022  skrll Provide pci_intr_setattr (which does nothing atm)
 1.2 29-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 29-Mar-2014  tls file pci_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 29-Mar-2014  yamt file pci_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 29-Mar-2014  rmind file pci_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3 24-Feb-2025  andvar fix various typos in comments.
 1.2 26-Mar-2023  andvar branches: 1.2.6;
fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file pdc.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file pdc.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file pdc.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.6.1 02-Aug-2025  perseant Sync with HEAD
 1.41 26-May-2022  skrll port-hppa/56849: Wacko kernel memory accounting in current/hppa

Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove
 1.40 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.39 24-Feb-2020  ad Adjust for UVM locking changes.
 1.38 12-Aug-2019  skrll branches: 1.38.2;
Use __BIT()
 1.37 07-Jan-2013  chs branches: 1.37.38; 1.37.42;
switch to __USE_TOPDOWN_VM.
move the stack to the top of the user address space so that
the available free space is more contiguous.
 1.36 06-Jan-2012  skrll branches: 1.36.6;
Track if a page has an executable mapping and flush the icache (and
dcache) appropriately.

Fixes the lang/python26 build on my C3700 (PA8700) and chuq's J6700 with
PA8500.

Thanks to chuq for ideas and help with this.
 1.35 06-Jan-2012  skrll Comment fix.
 1.34 06-Jan-2012  skrll No need to flush the icache/itlb for pool pages as they're never marked
executable.
 1.33 23-Dec-2011  skrll Define PMAP_NEED_PROCWR and provide pmap_procwr so that the i-cache is
synchronised with the d-cache appropriately.
 1.32 16-Dec-2011  skrll Whitespace.
 1.31 16-Dec-2011  skrll G/C pvh_aliases
 1.30 12-Jun-2011  rmind branches: 1.30.2; 1.30.6;
Welcome to 5.99.53! Merge rmind-uvmplock branch:

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

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

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

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

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

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
 1.29 14-Nov-2010  uebayasi branches: 1.29.6;
Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap. vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
 1.28 06-Jul-2010  cegger Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.
 1.27 21-Jun-2010  skrll Allow PVF_UNCACHEABLE in set/clear of pmap_changebit call (for now).
 1.26 19-Mar-2010  skrll Not all PA CPUs have the U-bit (uncacheable) for non-IO memory. In fact
most don't. Deal with non-equivalent aliases by removing and flushing the
managed mappings, and flushing the unmanaged mappings.

When flushing caches/TLB flush the cache before purging the TLB just in
case the flush enters the mapping into the TLB.
 1.25 06-Mar-2010  skrll branches: 1.25.2;
Add #include "opt_cputype.h" where necessary.
 1.24 22-Feb-2010  skrll Deal with PA2.0 cache move-in rules by purging the TLB as well as
flushing/purging the cache.
 1.23 15-Nov-2009  skrll branches: 1.23.2;
Put PMAP_NOCACHE in the MD space.
 1.22 11-Nov-2009  skrll Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE.
 1.21 24-May-2009  skrll u_intNN_t -> uintNN_t

"same" code before and after.
 1.20 30-Apr-2009  skrll Remove if defined(HP7100LC_CPU) || defined(HP7300LC_CPU) from around
pmap_hptsize and pdc_hwtlb (for now).
 1.19 30-Apr-2009  skrll Move HPPA_SID_KERNEL into pmap.h and deal with the move.
 1.18 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.17 09-Dec-2008  pooka branches: 1.17.2;
Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module. pmap_kernel()
remains as the syntactic sugar.

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

Thanks to Greg Oster for providing cpu muscle for doing test builds.
 1.16 06-Jan-2008  dsl branches: 1.16.6; 1.16.10; 1.16.16; 1.16.18;
include sys/simplelock.h
 1.15 17-Oct-2007  garbled branches: 1.15.2; 1.15.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.14 12-Jul-2007  skrll branches: 1.14.10;
Like I said - don't futz with the trapframe in pmap_activate. Instead
update the trapframe space and protection register in cpu_lwp_fork and
setregs.
 1.13 18-May-2007  skrll pmap_activate shouldn't play with the trap frame - especially not now it's
called by the MI code.

Implement a way of tracking the vmspace allocated to a process and its
LWPs so that if it changes underneath us we can correct the space id in
the trapframe in pmap_activate for now.

An example of when this happens is vfork/exec.

An exec hook is probably the way to go.
 1.12 07-Apr-2007  skrll branches: 1.12.4;
de-__P()

s/lwp/l/ for argument name in pmap_deactivate.
 1.11 16-Feb-2006  perry branches: 1.11.20; 1.11.24; 1.11.26;
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.10 24-Dec-2005  perry branches: 1.10.2; 1.10.4; 1.10.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 17-Jan-2005  atatat branches: 1.8.8;
Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
 1.7 18-Jul-2004  chs branches: 1.7.4;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.6 18-May-2004  chs convert pmap_deactivate() from a macro to an inline function
so that the kernel builds again.
 1.5 05-Jan-2004  chs add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
 1.4 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.3 22-Sep-2002  chs branches: 1.3.6;
it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.2 22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file pmap.h was added on branch gehenna-devsw on 2002-07-14 17:47:29 +0000
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file pmap.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.3.6.2 17-Jan-2005  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.4.1 29-Apr-2005  kent sync with -current
 1.8.8.2 21-Jan-2008  yamt sync with head
 1.8.8.1 03-Sep-2007  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.10.2.1 18-Feb-2006  yamt sync with head.
 1.11.26.1 11-Jul-2007  mjf Sync with head.
 1.11.24.3 15-Jul-2007  ad Sync with head.
 1.11.24.2 27-May-2007  ad Sync with head.
 1.11.24.1 10-Apr-2007  ad Sync with head.
 1.11.20.1 15-Apr-2007  yamt sync with head.
 1.12.4.2 03-Oct-2007  garbled Sync with HEAD
 1.12.4.1 22-May-2007  matt Update to HEAD.
 1.14.10.2 09-Jan-2008  matt sync with HEAD
 1.14.10.1 06-Nov-2007  matt sync with HEAD
 1.15.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.15.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.18.13 28-Apr-2009  skrll Track unmanaged mappings to deal with loaning and non-equivalient aliases.
 1.16.18.12 11-Feb-2009  skrll -extern struct pmap kernel_pmap_store;
 1.16.18.11 11-Feb-2009  skrll Handle non-equivalent aliases.

Thanks to mjf for help with this.
 1.16.18.10 30-Jan-2009  skrll Add some defines for attributes of pages or mappings of pages
 1.16.18.9 25-Jan-2009  skrll Be careful not to PMAP_UNMAP_POOLPAGE and leave cache aliases.
 1.16.18.8 19-Jan-2009  skrll Sync with HEAD.
 1.16.18.7 09-Dec-2008  mjf Back out my previous change. PMAP_NC is blatantly used, which means I
just broke the build.
 1.16.18.6 08-Dec-2008  mjf Delete PMAP_NC because it's never used. To mark a vmpage as uncacheable
we use pmap_pvh_attrs(TLB_UNCACHEABLE) instead.
 1.16.18.5 02-Dec-2008  skrll Whirespace.
 1.16.18.4 02-Dec-2008  skrll Add PMAP_{,UN}MAP_POOLPAGE
 1.16.18.3 17-Nov-2008  skrll Restore PMAP_NC
 1.16.18.2 17-Nov-2008  skrll G/C some old stuff.
 1.16.18.1 27-Oct-2008  skrll Commit work in progress.
 1.16.16.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.16.10.4 11-Aug-2010  yamt sync with head.
 1.16.10.3 11-Mar-2010  yamt sync with head
 1.16.10.2 20-Jun-2009  yamt sync with head
 1.16.10.1 04-May-2009  yamt sync with head.
 1.16.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.17.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.2.4 16-Nov-2010  uebayasi Sync with HEAD.
 1.23.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.23.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.23.2.1 25-Feb-2010  uebayasi Use VM_PAGE_TO_MD(). Only compile tested.
 1.25.2.5 09-Mar-2011  skrll Drop per-page locking i.e. pvh_lock and rely on locking provided by
upper layer, UVM. Sprinkle asserts.
 1.25.2.4 05-Mar-2011  rmind sync with head
 1.25.2.3 03-Jul-2010  rmind sync with head
 1.25.2.2 30-May-2010  rmind sync with head
 1.25.2.1 16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.29.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.30.6.1 18-Feb-2012  mrg merge to -current.
 1.30.2.2 23-Jan-2013  yamt sync with head
 1.30.2.1 17-Apr-2012  yamt sync with head
 1.36.6.1 25-Feb-2013  tls resync with head
 1.37.42.1 10-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1467):

sys/arch/hppa/include/pmap.h: revision 1.41
sys/arch/hppa/hppa/pmap.c: revision 1.117

port-hppa/56849: Wacko kernel memory accounting in current/hppa

Two fixes:
- Don't include direct mapped memory in pmap statistics
- Decrement pmap statistics counts in pmap_kremove
 1.37.38.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37.38.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.38.2.1 29-Feb-2020  ad 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.200; 1.1.202;
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.202.1 10-Jun-2019  christos Sync with HEAD
 1.1.200.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:35:50 +0000
 1.1.2.2 31-Aug-2002  gehenna catch up with -current.
 1.1.2.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-31 13:44:48 +0000
 1.15 23-Jul-2023  skrll PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN

Provide syscall_intern and use the md_syscall in syscall trap handling.
 1.14 23-Jul-2023  skrll Use __BIT
 1.13 05-Dec-2020  christos Use __vaddr_t since we don't expose vaddr_t by default to userland.
 1.12 06-Mar-2014  skrll branches: 1.12.42;
Move to a flat space register convention. %sr[4-7] are all now the space
number allocated to the process. gcc produces (slightly) better code
with this convention.

Retain backwards compatiblity.

Welcome to 6.99.36
 1.11 14-Jan-2011  rmind branches: 1.11.8; 1.11.18; 1.11.22;
Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete. Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
 1.10 03-Apr-2010  skrll Add md_astpending to struct mdlwp and use it.
 1.9 31-Mar-2010  skrll Whitespace.
 1.8 21-Nov-2009  rmind branches: 1.8.2; 1.8.4;
Include sys/user.h for MD proc.h (hppa and m68k ports).
 1.7 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.6 10-Jan-2008  skrll branches: 1.6.10; 1.6.18; 1.6.24;
Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.5 16-Nov-2007  skrll branches: 1.5.6;
s/proc/lwp/ in comment
 1.4 11-Dec-2005  christos branches: 1.4.30; 1.4.48; 1.4.50; 1.4.54; 1.4.56;
merge ktrace-lwp.
 1.3 31-Aug-2003  chs branches: 1.3.16;
update for LWPs, and some lite cleanup.
 1.2 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.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file proc.h was added on branch gehenna-devsw on 2002-07-14 17:47:29 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file proc.h was added on branch kqueue on 2002-06-23 17:37:09 +0000
 1.3.16.2 21-Jan-2008  yamt sync with head
 1.3.16.1 07-Dec-2007  yamt sync with head
 1.4.56.2 18-Feb-2008  mjf Sync with HEAD.
 1.4.56.1 19-Nov-2007  mjf Sync with HEAD.
 1.4.54.1 18-Nov-2007  bouyer Sync with HEAD
 1.4.50.2 23-Mar-2008  matt sync with HEAD
 1.4.50.1 09-Jan-2008  matt sync with HEAD
 1.4.48.1 21-Nov-2007  joerg Sync with HEAD.
 1.4.30.1 03-Dec-2007  ad Sync with HEAD.
 1.5.6.1 11-Jan-2008  bouyer Sync with HEAD
 1.6.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.18.1 27-Oct-2008  skrll Commit work in progress.
 1.6.10.3 11-Aug-2010  yamt sync with head.
 1.6.10.2 11-Mar-2010  yamt sync with head
 1.6.10.1 04-May-2009  yamt sync with head.
 1.8.4.2 05-Mar-2011  rmind sync with head
 1.8.4.1 30-May-2010  rmind sync with head
 1.8.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11.22.1 18-May-2014  rmind sync with head
 1.11.18.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.8.1 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.8 12-Nov-2007  skrll Fix kernel profiling on HPPA.

- stop gcc emitting stuff that HPUX requires
- don't use splhigh() in MCOUNT_ENTER as a call to _mcount will be
generated at the moment. Disable interrupts in hardware instead.
- Fix _PROF_PROLOGUE to save/restore all the register args when calling
_mcount.
- Fixup LEAF_ENTRY to dtrt (I think) in the GPROF case.
- Provide LEAF_ENTRY_NOPROFILE and sprinkle its use where i) profiling
causes problems, e.g. trap handlers, and ii) where it just doesn't
make sense, e.g. start.
 1.7 07-Apr-2007  skrll branches: 1.7.12; 1.7.14; 1.7.18; 1.7.20;
de-__P()

s/lwp/l/ for argument name in pmap_deactivate.
 1.6 16-Feb-2006  perry branches: 1.6.20; 1.6.24; 1.6.26;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.5 24-Dec-2005  perry branches: 1.5.2; 1.5.4; 1.5.6;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.4 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 07-Aug-2003  agc branches: 1.2.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file profile.h was added on branch gehenna-devsw on 2002-07-14 17:47:29 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file profile.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.2.16.3 15-Nov-2007  yamt sync with head.
 1.2.16.2 03-Sep-2007  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Feb-2006  yamt sync with head.
 1.6.26.1 11-Jul-2007  mjf Sync with head.
 1.6.24.2 03-Dec-2007  ad Sync with HEAD.
 1.6.24.1 10-Apr-2007  ad Sync with head.
 1.6.20.1 15-Apr-2007  yamt sync with head.
 1.7.20.1 19-Nov-2007  mjf Sync with HEAD.
 1.7.18.1 13-Nov-2007  bouyer Sync with HEAD
 1.7.14.1 09-Jan-2008  matt sync with HEAD
 1.7.12.1 14-Nov-2007  joerg Sync with HEAD.
 1.9 08-Feb-2018  dholland Typos.
 1.8 29-Mar-2012  skrll Remove unnecessary #include
 1.7 03-Nov-2009  snj branches: 1.7.12; 1.7.16;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.6 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.5 18-Jan-2008  skrll branches: 1.5.10; 1.5.18; 1.5.24;
Add W and O PSW bit defines.

From OpenBSD.
 1.4 11-Dec-2005  christos branches: 1.4.50; 1.4.56; 1.4.64;
merge ktrace-lwp.
 1.3 18-Jul-2004  chs branches: 1.3.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file psl.h was added on branch gehenna-devsw on 2002-07-14 17:47:30 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file psl.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.3.12.1 21-Jan-2008  yamt sync with head
 1.4.64.1 19-Jan-2008  bouyer Sync with HEAD
 1.4.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.50.1 23-Mar-2008  matt sync with HEAD
 1.5.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.18.1 27-Oct-2008  skrll Commit work in progress.
 1.5.10.2 11-Mar-2010  yamt sync with head
 1.5.10.1 04-May-2009  yamt sync with head.
 1.7.16.1 05-Apr-2012  mrg sync to latest -current.
 1.7.12.1 17-Apr-2012  yamt sync with head
 1.5 16-Apr-2019  skrll Trailing whitespace
 1.4 16-Jan-2010  skrll branches: 1.4.64;
Add a couple of comments and some whitespace.
 1.3 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.2 11-Aug-2002  fredette branches: 1.2.112; 1.2.120; 1.2.126;
Significant pmap changes to no longer rely on the "U-bit" (TLB_UNCACHEABLE)
to deal with aliasing of regular memory pages, because many processors don't
support it.

Now, the pmap marks all mappings of a page that has any non-equivalent
aliasing and any writable mapping, and the fault handlers watch for this
and flush other mappings out of the TLB and cache before (re)entering a
conflicting mapping.

When a page has non-equivalent aliasing, only one writable mapping at
a time may be in the TLB and cache. If no writable mapping is in the
TLB and cache, any number of read-only mappings may be.

The PA7100LC/PA7300LC fault handlers have not been converted yet.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file pte.h was added on branch gehenna-devsw on 2002-07-14 17:47:30 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file pte.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.2.126.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.120.2 29-Oct-2008  skrll Improve TLB_BITS.

Tidy-up a bit.
 1.2.120.1 27-Oct-2008  skrll Commit work in progress.
 1.2.112.2 11-Mar-2010  yamt sync with head
 1.2.112.1 04-May-2009  yamt sync with head.
 1.4.64.1 10-Jun-2019  christos Sync with HEAD
 1.12 06-Jun-2022  skrll Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.
 1.11 06-Jun-2022  skrll Define a PTRACE_ILLEGAL_ASM
 1.10 24-Dec-2019  kamil Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO

PT_LWPINFO is a legacy ptrace(2) operation that was originally intended
to retrieve the thread (LWP) information inside a traced process.

It has a number of flaws and is confused with PT_LWPINFO from FreeBSD.

PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename,
removal of pl_event) and introduces new features: signal context
(pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address
(pl_private). The private pointer was so far missing information for
a debugger.

PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific
information, so far missed in the core(5) files.

PT_LWPSTATUS retrieves LWP information for the prompted thread.
PT_LWPNEXT retrieves LWP information for the next thread, borrowing the
semantics from NetBSD specific PT_LWPINFO.

PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for
the foreseeable future, without plans of removing it.

Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT.

Keep ATF tests for PT_LWPINFO.

Switch GDB to new API.

Proposed on tech-kern@.
 1.9 18-Jun-2019  kamil branches: 1.9.2;
Introduce PTRACE_REG_FP() a helper macro to retrieve the frame pointer

The macro is dummy for ia64 (the FP register is unknown and can change
freely) and sparc/sparc64 (not stored in struct reg).
 1.8 12-Apr-2017  kamil branches: 1.8.12;
Add new macro PTRACE_BREAKPOINT_ASM in <sys/ptrace.h> MD part

This macro ships with a MD-specific assembly instruction triggering
a software breakpoint.

Missing instruction for powerpc targets.

This code is used in ATF tests (lib/libc/sys/t_ptrace_wait).

Original patch by Nick Hudson, thanks!
 1.7 08-Apr-2017  kamil Add new ptrace(2) API: PT_SETSTEP & PT_CLEARSTEP

These operations allow to mark thread as a single-stepping one.

This allows to i.a.:
- single step and emit a signal (PT_SETSTEP & PT_CONTINUE)
- single step and trace syscall entry and exit (PT_SETSTEP & PT_SYSCALL)

The former is useful for debuggers like GDB or LLDB. The latter can be used
to singlestep a usermode kernel. These examples don't limit use-cases of
this interface.

Define PT_*STEP only for platforms defining PT_STEP.

Add new ATF tests setstep[1234].

These ptrace(2) operations first appeared in FreeBSD.

Sponsored by <The NetBSD Foundation>
 1.6 25-Nov-2016  christos branches: 1.6.2;
fix register names
 1.5 25-Sep-2015  christos branches: 1.5.2;
For processors that have memory breakpoints, add macros for them to help
libproc
 1.4 15-Sep-2015  christos Provide access to pc/sp/syscall-return registers like we have for mcontext
 1.3 03-Nov-2009  snj branches: 1.3.22; 1.3.40;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.2 22-Nov-2007  skrll branches: 1.2.18;
Define PT_MACHDEP_STRINGS for kdump(1)
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26; 1.1.68; 1.1.86; 1.1.88; 1.1.92; 1.1.94;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.94.1 08-Dec-2007  mjf Sync with HEAD.
 1.1.92.1 22-Nov-2007  bouyer Sync with HEAD
 1.1.88.1 09-Jan-2008  matt sync with HEAD
 1.1.86.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.1.68.2 03-Dec-2007  ad Sync with HEAD.
 1.1.68.1 03-Dec-2007  ad Sync with HEAD.
 1.1.26.1 07-Dec-2007  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file ptrace.h was added on branch gehenna-devsw on 2002-07-14 17:47:31 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file ptrace.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.2.18.1 11-Mar-2010  yamt sync with head
 1.3.40.4 28-Aug-2017  skrll Sync with HEAD
 1.3.40.3 05-Dec-2016  skrll Sync with HEAD
 1.3.40.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.3.40.1 22-Sep-2015  skrll Sync with HEAD
 1.3.22.1 03-Dec-2017  jdolecek update from HEAD
 1.5.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.5.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.8.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.12.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.9.2.1 10-Jun-2022  martin Pull up following revision(s) (requested by skrll in ticket #1468):

sys/arch/hppa/hppa/trap.c: revision 1.120
sys/arch/hppa/include/ptrace.h: revision 1.11-1.12 (via patch)

Define a PTRACE_ILLEGAL_ASM

Match up PTRACE_BREAKPOINT_ASM with PTRACE_BREAKPOINT which is the
gdb breakpoint instruction.

Only report the SSBREAKPOINT break instruction as SIGTRAP/TRAP_TRACE. All
other break instructions will be reported as SIGTRAP/TRAP_BRKPT
This fixes a mistake I made back in 2008.

PR/56866: hppa: kernel gets confused between actual breakpoints and
single-step breakpoints
 1.13 16-Apr-2019  skrll Trailing whitespace
 1.12 06-Jun-2010  skrll branches: 1.12.60;
MULTIPROCESSOR fixes

- provide curcpu in a control register instead of curlwp
- define {GET,SET}_CURLWP and GET_CURCPU and use whereever possible.
- define a cpu count and use it in CPU_INFO_FOREACH

XXX hppa_ncpus isn't valid yet.
 1.11 16-Mar-2010  skrll The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
 1.10 03-Nov-2009  snj branches: 1.10.2; 1.10.4;
Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.9 24-May-2009  skrll u_intNN_t -> uintNN_t

"same" code before and after.
 1.8 16-May-2009  skrll Note that CR27 is used for thread local storage (TLS)
 1.7 30-Apr-2009  skrll Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.6 10-Jan-2008  skrll branches: 1.6.10; 1.6.18; 1.6.24;
Various improvements to the hppa kernel for gdb.

- add the useful space and control registers to struct reg
- update process_{read,write}_regs accordingly
- use MID_HPPA in core dumps.
- dump the fp regs into cores.
- add single stepping support from OpenBSD.
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.56; 1.5.64;
merge ktrace-lwp.
 1.4 31-Jan-2005  jkunz branches: 1.4.6;
Implement powerd(8) interface via sysmon(9) for power switch, controllable by sysctl(8).
 1.3 26-Aug-2004  jkunz branches: 1.3.4; 1.3.6;
Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
 1.2 18-Jul-2004  chs add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 04-Feb-2005  skrll Sync with HEAD.
 1.1.10.2 03-Sep-2004  skrll Sync with HEAD
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file reg.h was added on branch gehenna-devsw on 2002-07-14 17:47:31 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file reg.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.3.6.1 12-Feb-2005  yamt sync with head.
 1.3.4.1 29-Apr-2005  kent sync with -current
 1.4.6.1 21-Jan-2008  yamt sync with head
 1.5.64.1 11-Jan-2008  bouyer Sync with HEAD
 1.5.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.5.50.1 23-Mar-2008  matt sync with HEAD
 1.6.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.18.3 17-Apr-2009  skrll Correct a comment.
 1.6.18.2 28-Feb-2009  skrll Correct comment.
 1.6.18.1 27-Oct-2008  skrll Commit work in progress.
 1.6.10.4 11-Aug-2010  yamt sync with head.
 1.6.10.3 11-Mar-2010  yamt sync with head
 1.6.10.2 20-Jun-2009  yamt sync with head
 1.6.10.1 04-May-2009  yamt sync with head.
 1.10.4.2 03-Jul-2010  rmind sync with head
 1.10.4.1 30-May-2010  rmind sync with head
 1.10.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.12.60.1 10-Jun-2019  christos Sync with HEAD
 1.2 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.1 11-Mar-2010  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file reloc.h was added on branch gehenna-devsw on 2002-07-14 17:47:31 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file reloc.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.6 29-Nov-2019  riastradh Largely eliminate the MD rwlock.h header file.

This was full of definitions that have been obsolete for over a
decade. The file still remains for __HAVE_RW_STUBS but that's all.
Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.
 1.5 28-Apr-2008  martin branches: 1.5.88;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.14; 1.4.16; 1.4.18;
- Change lock_cas from "compare and set" to "compare and swap".
- Add aliases for atomic_cas_ulong(), etc.

Ok skrll@
 1.3 21-Nov-2007  yamt make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
 1.2 09-Feb-2007  ad branches: 1.2.4; 1.2.8; 1.2.24; 1.2.26; 1.2.30; 1.2.32;
Merge newlock2 to head.
 1.1 29-Jan-2007  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 29-Jan-2007  ad Make hp700 compile.
 1.2.32.1 08-Dec-2007  mjf Sync with HEAD.
 1.2.30.1 21-Nov-2007  bouyer Sync with HEAD
 1.2.26.1 09-Jan-2008  matt sync with HEAD
 1.2.24.2 03-Dec-2007  joerg Sync with HEAD.
 1.2.24.1 21-Nov-2007  joerg Sync with HEAD.
 1.2.8.1 03-Dec-2007  ad Sync with HEAD.
 1.2.4.3 07-Dec-2007  yamt sync with head
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:06:43 +0000
 1.4.18.1 16-May-2008  yamt sync with head.
 1.4.16.1 18-May-2008  yamt sync with head.
 1.4.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.88.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file setjmp.h was added on branch gehenna-devsw on 2002-07-14 17:47:31 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file setjmp.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.12 28-Oct-2021  christos Finish restoring the compat code.
 1.11 28-Oct-2021  christos We still need struct sigcontext for longjmp.
 1.10 27-Oct-2021  thorpej "struct sigcontext" has never been used on NetBSD/hppa; garbage-collect
it and other related definitions.
 1.9 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.8 16-Apr-2019  skrll Trailing whitespace
 1.7 29-Nov-2017  christos branches: 1.7.4;
need sigtypes.h for sigset_t, since <sys/siginfo.h> includes this directly.
 1.6 02-Jan-2011  skrll branches: 1.6.18;
__HAVE_SIGINFO has not been required/used for a long time now.

Prompted by uwe@
 1.5 11-Dec-2005  christos branches: 1.5.100;
merge ktrace-lwp.
 1.4 26-Mar-2004  drochner To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
 1.3 20-Sep-2003  matt Add multiple inclusion protection.
 1.2 28-Apr-2003  bjh21 branches: 1.2.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file signal.h was added on branch gehenna-devsw on 2002-07-14 17:47:32 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file signal.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.100.1 05-Mar-2011  rmind sync with head
 1.6.18.1 03-Dec-2017  jdolecek update from HEAD
 1.7.4.1 10-Jun-2019  christos Sync with HEAD
 1.2 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.116;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.116.1 11-Mar-2010  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file som.h was added on branch gehenna-devsw on 2002-07-14 17:47:32 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file som.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 1.2 03-Mar-2007  skrll Actually remove spinlock.h
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26; 1.1.64;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.64.2 17-May-2007  yamt fix a merge botch.
 1.1.64.1 12-Mar-2007  rmind Sync with HEAD.
 1.1.26.1 03-Sep-2007  yamt sync with head.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file spinlock.h was added on branch gehenna-devsw on 2002-07-14 17:47:32 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file spinlock.h was added on branch kqueue on 2002-06-23 17:37:10 +0000
 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 07-Jul-2011  mrg port to GCC 4.5.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 04-Feb-2005  skrll Modernise these to use GCC __builtin_* functions and types.

Also provide a (protected) va_copy.
 1.3 03-Feb-2005  jmc Provide lint wrappers around the va_* defs like other ports do so this can
make it through lint (was dying in libpam)
 1.2 07-Aug-2003  agc branches: 1.2.8; 1.2.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.5 04-Feb-2005  skrll Sync with HEAD.
 1.1.10.4 04-Feb-2005  skrll Sync with HEAD.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file stdarg.h was added on branch gehenna-devsw on 2002-07-14 17:47:33 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file stdarg.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.10.1 12-Feb-2005  yamt sync with head.
 1.2.8.1 29-Apr-2005  kent sync with -current
 1.5 06-Sep-2021  andvar fix various typos in comments.
 1.4 16-Jan-2010  skrll Use the description in the ACD for T_DBREAK.
 1.3 03-Nov-2009  snj Follow upstream license changes for files with Michael Shalayeff's
copyright. In most cases, this means dropping the 3rd and 4th clauses.
 1.2 22-Dec-2007  skrll branches: 1.2.10;
Add some more trap types and HPPA_BREAK_SS. From OpenBSD.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26; 1.1.88; 1.1.98; 1.1.102;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.102.1 02-Jan-2008  bouyer Sync with HEAD
 1.1.98.1 26-Dec-2007  ad Sync with head.
 1.1.88.1 09-Jan-2008  matt sync with HEAD
 1.1.26.1 21-Jan-2008  yamt sync with head
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file trap.h was added on branch gehenna-devsw on 2002-07-14 17:47:33 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file trap.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.10.1 11-Mar-2010  yamt sync with head
 1.33 28-Apr-2024  skrll Whitespace
 1.32 23-Jul-2023  skrll PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN

Provide syscall_intern and use the md_syscall in syscall trap handling.
 1.31 01-Apr-2021  simonb Whitespace: #define<tab>
 1.30 23-Jan-2021  christos branches: 1.30.2;
Document via __HAVE_BUS_SPACE_8 platforms that implement bus_space_*_8
 1.29 05-Dec-2020  christos Use __vaddr_t since we don't expose vaddr_t by default to userland.
 1.28 16-Apr-2020  skrll branches: 1.28.2;
To allow concurrent page faults on the same set of pages lock the PV
lists. From ad@ and fixed up by me.

Remove __HAVE_UNLOCKED_PMAP
 1.27 22-Mar-2020  ad branches: 1.27.2;
Temporarily mark hppa, mips, powerpc and riscv with __HAVE_UNLOCKED_PMAP,
for the benefit of UVM.

These need some pmap changes to support concurrent faults on the same
object. I have changes to do just that, but they're a work in progress.
 1.26 23-Jan-2016  christos branches: 1.26.18;
expose the kernel types for standalone code.
 1.25 23-Jan-2016  christos Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
 1.24 27-Aug-2015  pooka Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

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

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

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

Based on the patch from Christos in lib/49989.
 1.23 24-Feb-2014  skrll branches: 1.23.6;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.22 18-Jan-2012  skrll branches: 1.22.6; 1.22.10;
Support crash(8) on hppa.
 1.21 10-Jan-2012  skrll G/C vm_{offset,size}_t
 1.20 17-Mar-2011  skrll branches: 1.20.4; 1.20.8;
HPPA TLS support.
 1.19 28-Feb-2011  skrll __HAVE___LWP_GETPRIVATE_FAST works now.
 1.18 24-Feb-2011  joerg Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
 1.17 11-Dec-2009  matt branches: 1.17.4; 1.17.6; 1.17.8;
Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge). These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
 1.16 17-Oct-2007  garbled branches: 1.16.20;
Merge the ppcoea-renovation branch to HEAD.

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

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

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 10-Sep-2007  skrll Merge nick-csl-alignment.
 1.14 17-May-2007  yamt branches: 1.14.4; 1.14.8; 1.14.10;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.13 24-Dec-2005  perry branches: 1.13.26; 1.13.30; 1.13.32; 1.13.38;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 07-Aug-2004  chs branches: 1.11.12;
remove the alignment attribute from the typedef of __cpu_simple_lock_t
since it doesn't have any affect and lint chokes on it.
 1.10 19-Jul-2004  chs put RAS_DECL() back to declaring a function by default (since SH5
requires that). instead, allow <machine/types.h> to override the
default definition and do so on hppa.
 1.9 18-Jul-2004  chs add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.8 01-Nov-2003  matt Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
 1.7 06-Oct-2003  matt Change headers to comply with the new toolchain changes.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.5 28-Apr-2003  bjh21 branches: 1.5.2;
Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
 1.4 22-Sep-2002  simonb Use "#define\t" instead of "#define ".
 1.3 22-Sep-2002  gmcgarry Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives.
 1.2 10-Jul-2002  fredette branches: 1.2.2;
Define __HAVE_FUNCTION_DESCRIPTORS, which is used by ld.elf_so.
 1.1 05-Jun-2002  fredette branches: 1.1.2;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.2.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file types.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.2.3 16-Jul-2002  gehenna catch up with -current.
 1.2.2.2 14-Jul-2002  gehenna catch up with -current.
 1.2.2.1 10-Jul-2002  gehenna file types.h was added on branch gehenna-devsw on 2002-07-14 17:47:33 +0000
 1.5.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.12.3 27-Oct-2007  yamt sync with head.
 1.11.12.2 03-Sep-2007  yamt sync with head.
 1.11.12.1 21-Jun-2006  yamt sync with head.
 1.13.38.2 03-Oct-2007  garbled Sync with HEAD
 1.13.38.1 22-May-2007  matt Update to HEAD.
 1.13.32.1 11-Jul-2007  mjf Sync with head.
 1.13.30.2 09-Oct-2007  ad Sync with head.
 1.13.30.1 27-May-2007  ad Sync with head.
 1.13.26.1 23-Mar-2007  skrll Adapt hp700/hppa to yamt-idlelwp.

XXX Interrupts can fire before curlwp = new in sched_switch_unlock.
XXX This triggers the DEBUG check in sys/arch/hppa/hppa/trap.c:451
 1.14.10.1 06-Nov-2007  matt sync with HEAD
 1.14.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.14.4.1 18-Jul-2007  skrll Initial work on provided correctly aligned __cpu_simple_lock_t for hppa
and first attempt at adapting i386 to the changes.

More to come.
 1.16.20.1 11-Mar-2010  yamt sync with head
 1.17.8.1 05-Mar-2011  bouyer Sync with HEAD
 1.17.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.17.4.2 21-Apr-2011  rmind sync with head
 1.17.4.1 05-Mar-2011  rmind sync with head
 1.20.8.1 18-Feb-2012  mrg merge to -current.
 1.20.4.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.4.1 17-Apr-2012  yamt sync with head
 1.22.10.1 18-May-2014  rmind sync with head
 1.22.6.2 03-Dec-2017  jdolecek update from HEAD
 1.22.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.6.2 19-Mar-2016  skrll Sync with HEAD
 1.23.6.1 22-Sep-2015  skrll Sync with HEAD
 1.26.18.2 21-Apr-2020  martin Sync with HEAD
 1.26.18.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.27.2.1 20-Apr-2020  bouyer Sync with HEAD
 1.28.2.2 03-Apr-2021  thorpej Sync with HEAD.
 1.28.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.30.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4 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.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 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.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file varargs.h was added on branch gehenna-devsw on 2002-07-14 17:47:34 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file varargs.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.22 26-Feb-2021  simonb Use a valuely human readable number for MAXTSIZ.
 1.21 16-Apr-2019  skrll branches: 1.21.12;
Trailing whitespace
 1.20 07-Jan-2013  chs branches: 1.20.38;
switch to __USE_TOPDOWN_VM.
move the stack to the top of the user address space so that
the available free space is more contiguous.
 1.19 16-Nov-2010  uebayasi branches: 1.19.8; 1.19.18;
MD interrupt implementation is not VM parameter.
 1.18 14-Nov-2010  uebayasi Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap. vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
 1.17 14-Nov-2010  uebayasi Don't rely on global APIs from internal.
 1.16 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.15 16-Feb-2010  skrll branches: 1.15.2;
Remove the dma24_ex method of dealing with BUS_DMA_24BIT and replace
with a uvm managed freelist of pages in the right range.
 1.14 30-Apr-2009  skrll branches: 1.14.2;
Merge nick-hppapmap.

This is a port of the OpenBSD pmap and trap handling code to get us

- Performance boost on some/all machines.
- Well on the way to PA2.0 (in 32bit mode) support. Several
machines probe hardware, but fail sometime after interrupts
are enabled.

Other things changed / fixed on the branch are

- update autoconf to use the OpenBSD code.
- com @ dino is very close to being supported.
- HPPA_REDZONE has been replaced with a working redzone which
is enabled with DIAGNOSTIC.
- UPAGES has been halved in size.
- power(4) from OpenBSD to fix a few bugs.
- updated list of modules from OpenBSD.
- initial ports of uturn(4), astro(4) and elroy(4).
- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
 1.13 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.12 05-Feb-2008  skrll branches: 1.12.10; 1.12.18; 1.12.24;
Rely on implicit PAGE_SIZE alignment and don't confuse uvm_glue.c.
 1.11 18-Apr-2007  skrll branches: 1.11.12; 1.11.18;
Whitespace.
 1.10 18-Apr-2007  skrll Bump the initial stack size limit to bring in line with other ports.

newfs_lfs doesn't core by default now.
 1.9 07-Apr-2007  skrll Correct a comment.
 1.8 14-Oct-2006  skrll branches: 1.8.2; 1.8.4; 1.8.8; 1.8.10;
Typo in comment.
 1.7 11-Dec-2005  christos branches: 1.7.20; 1.7.22;
merge ktrace-lwp.
 1.6 18-Jul-2004  chs branches: 1.6.12;
add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
- fill in the definition of struct mcontext.
- implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
cpu_switchto().
- for now, force the right priviledge bits and space regs in setcontext().
- use correct values for __SIMPLELOCK_*.
- move the user stack to start at a multiple of the pthread stack size
so that libpthread can use the sp-masking trick.
 1.5 02-Apr-2003  thorpej branches: 1.5.2;
Use PAGE_SIZE rather than NBPG.
 1.4 01-Apr-2003  thorpej * Define PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK in <hppa/vmparam.h>,
not in <hppa/param.h>.
* Define NBPG in terms of PGSHIFT.
 1.3 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.2 05-Aug-2002  fredette Made changes in where/how the kernel is linked, and how the pmap
maps it with BTLB entries, to minimize the number of BTLB entries
needed.

Because the CPU type was often guessed incorrectly, the mapping of
HP board number to system name now includes information about the
expected CPU type.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.3 31-Aug-2002  gehenna catch up with -current.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file vmparam.h was added on branch gehenna-devsw on 2002-07-14 17:47:34 +0000
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file vmparam.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.12.3 11-Feb-2008  yamt sync with head.
 1.6.12.2 03-Sep-2007  yamt sync with head.
 1.6.12.1 30-Dec-2006  yamt sync with head.
 1.7.22.1 22-Oct-2006  yamt sync with head
 1.7.20.1 18-Nov-2006  ad Sync with head.
 1.8.10.1 11-Jul-2007  mjf Sync with head.
 1.8.8.2 27-May-2007  ad Sync with head.
 1.8.8.1 10-Apr-2007  ad Sync with head.
 1.8.4.2 07-May-2007  yamt sync with head.
 1.8.4.1 15-Apr-2007  yamt sync with head.
 1.8.2.1 20-Apr-2007  bouyer Pull up following revision(s) (requested by skrll in ticket #583):
sys/arch/hppa/include/vmparam.h: revision 1.10
Bump the initial stack size limit to bring in line with other ports.
newfs_lfs doesn't core by default now.
 1.11.18.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.12.1 23-Mar-2008  matt sync with HEAD
 1.12.24.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.12.18.4 28-Apr-2009  skrll Sync with HEAD.
 1.12.18.3 11-Feb-2009  skrll Handle non-equivalent aliases.

Thanks to mjf for help with this.
 1.12.18.2 03-Feb-2009  skrll Make LOCKDEBUG kernels boot.
 1.12.18.1 27-Oct-2008  skrll Commit work in progress.
 1.12.10.2 11-Mar-2010  yamt sync with head
 1.12.10.1 04-May-2009  yamt sync with head.
 1.14.2.4 16-Nov-2010  uebayasi Sync with HEAD.
 1.14.2.3 30-Apr-2010  uebayasi Sync with HEAD.
 1.14.2.2 26-Apr-2010  uebayasi Remove the unfinished code to add a memory segment after uvm_page_init().
It doesn't even compile.

(In the future, we should allocate struct vm_page [] on the added memory
segment for NUMA's sake.)
 1.14.2.1 23-Feb-2010  uebayasi Convert all VM_MDPAGE_INIT()'s to take struct vm_page_md * and paddr_t.
 1.15.2.1 05-Mar-2011  rmind sync with head
 1.19.18.1 25-Feb-2013  tls resync with head
 1.19.8.1 23-Jan-2013  yamt sync with head
 1.20.38.1 10-Jun-2019  christos Sync with HEAD
 1.21.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 11-Dec-2005  christos branches: 1.2.74; 1.2.76; 1.2.78;
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:35:37 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 22-Mar-2016  mrg remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for. very few other targets claim they're done so just remove these.
 1.5 07-Sep-2015  uebayasi Order library object build.
 1.4 07-Sep-2015  uebayasi Sprinkle more done messages.
 1.3 11-Dec-2005  christos branches: 1.3.122; 1.3.142;
merge ktrace-lwp.
 1.2 15-Jun-2004  skrll Fix MAKEOBJDIRPREFIX builds and remove a line continuation that is not
needed.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file Makefile was added on branch gehenna-devsw on 2002-07-14 17:47:35 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.3.142.2 22-Apr-2016  skrll Sync with HEAD
 1.3.142.1 22-Sep-2015  skrll Sync with HEAD
 1.3.122.1 03-Dec-2017  jdolecek update from HEAD
 1.12 13-Jun-2018  christos revert previous MAKEOBJDIRPREFIX massaging
 1.11 11-Jun-2018  christos switch from MAKEOBJDIRPREFIX to MAKEOBJDIR.
 1.10 27-May-2018  christos - Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@
XXX: pullup 8
 1.9 22-Mar-2016  mrg branches: 1.9.10; 1.9.16;
remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for. very few other targets claim they're done so just remove these.
 1.8 25-Jan-2016  christos use :Q to quote variables properly.
 1.7 06-Sep-2015  uebayasi In kernel lib build, print message when things not only start bug also end.
 1.6 06-Sep-2015  uebayasi spmath.o is an MD library, not an MD object.
 1.5 05-Sep-2015  uebayasi Fix build of hppa's spmath.o, as m68k's fpsp.o was done.
 1.4 04-Feb-2006  dsl branches: 1.4.116; 1.4.136;
Add .MAKE to targets that run ${MAKE} so that parallel makes work properly.
 1.3 11-Dec-2005  christos branches: 1.3.2; 1.3.4; 1.3.6;
merge ktrace-lwp.
 1.2 15-Jun-2004  skrll branches: 1.2.12;
Fix MAKEOBJDIRPREFIX builds and remove a line continuation that is not
needed.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file Makefile.inc was added on branch gehenna-devsw on 2002-07-14 17:47:35 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file Makefile.inc was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.12.1 21-Jun-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3.2.1 18-Feb-2006  yamt sync with head.
 1.4.136.3 22-Apr-2016  skrll Sync with HEAD
 1.4.136.2 19-Mar-2016  skrll Sync with HEAD
 1.4.136.1 22-Sep-2015  skrll Sync with HEAD
 1.4.116.1 03-Dec-2017  jdolecek update from HEAD
 1.9.16.1 25-Jun-2018  pgoyette Sync with HEAD
 1.9.10.1 09-Jun-2018  martin Pull up following revision(s) (requested by christos in ticket #870):

sys/lib/libgnuefi/Makefile.inc: revision 1.5
external/mit/xorg/xorg-pkg-ver.mk: revision 1.9
sys/arch/i386/stand/lib/Makefile.inc: revision 1.17
sys/compat/common/Makefile.inc: revision 1.25
usr.bin/make/unit-tests/varquote.exp: revision 1.1, 1.2
sys/lib/libsa/Makefile.inc: revision 1.24
usr.bin/make/var.c: revision 1.220
sys/arch/ia64/stand/efi/libefi/Makefile.inc: revision 1.5
sys/arch/hppa/spmath/Makefile.inc: revision 1.10
usr.bin/make/unit-tests/varquote.mk: revision 1.1, 1.2
usr.bin/make/unit-tests/Makefile: revision 1.53
sys/lib/libkern/Makefile.inc: revision 1.45
sys/arch/acorn32/stand/lib/Makefile.inc: revision 1.4
sys/arch/m68k/fpsp/Makefile.inc: revision 1.21
usr.bin/make/make.1: revision 1.273
sys/lib/libz/Makefile.inc: revision 1.17

- Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@

XXX: pullup 8
 1.4 06-Feb-2019  mrg - convert shift results into logical expressions
 1.3 06-Apr-2008  skrll branches: 1.3.92;
de-__P
 1.2 22-Feb-2007  thorpej branches: 1.2.42;
TRUE -> true, FALSE -> false
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.26; 1.1.64;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.64.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.1.26.1 26-Feb-2007  yamt sync with head.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file cnv_float.h was added on branch gehenna-devsw on 2002-07-14 17:47:36 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file cnv_float.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.42.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.92.1 10-Jun-2019  christos Sync with HEAD
 1.4 28-May-2022  andvar s/grabing/grabbing/ in comments.
 1.3 27-Jan-2009  skrll From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.

Fixes regress/lib/libc/ieeefp/nan
 1.2 06-Apr-2008  skrll branches: 1.2.4; 1.2.12; 1.2.14;
de-__P
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dbl_float.h was added on branch gehenna-devsw on 2002-07-14 17:47:36 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dbl_float.h was added on branch kqueue on 2002-06-23 17:37:11 +0000
 1.2.14.1 02-Feb-2009  snj Pull up following revision(s) (requested by skrll in ticket #330):
sys/arch/hppa/spmath/dbl_float.h: revision 1.3
sys/arch/hppa/spmath/float.h: revision 1.4
sys/arch/hppa/spmath/sgl_float.h: revision 1.3
From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.
Fixes regress/lib/libc/ieeefp/nan
 1.2.12.1 03-Mar-2009  skrll Sync with HEAD.
 1.2.4.1 04-May-2009  yamt sync with head.
 1.7 31-Jul-2023  andvar fix typos in comments, mainly s/denomalized/denormalized/.
 1.6 17-Jan-2022  andvar fix typos in comments, mainly s/foward/forward/.
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfadd.c was added on branch gehenna-devsw on 2002-07-14 17:47:37 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfadd.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.4 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.116;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfcmp.c was added on branch gehenna-devsw on 2002-07-14 17:47:37 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfcmp.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.3.116.1 18-Feb-2012  mrg merge to -current.
 1.3.112.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfdiv.c was added on branch gehenna-devsw on 2002-07-14 17:47:38 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfdiv.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfmpy.c was added on branch gehenna-devsw on 2002-07-14 17:47:38 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfmpy.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfrem.c was added on branch gehenna-devsw on 2002-07-14 17:47:38 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfrem.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.6 29-Feb-2016  christos PR/50870: David Binderman: Use logical and instead of arithmetic
 1.5 04-Feb-2012  skrll branches: 1.5.6; 1.5.24;
-Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfsqrt.c was added on branch gehenna-devsw on 2002-07-14 17:47:39 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfsqrt.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5.24.1 19-Mar-2016  skrll Sync with HEAD
 1.5.6.1 03-Dec-2017  jdolecek update from HEAD
 1.7 31-Jul-2023  andvar fix typos in comments, mainly s/denomalized/denormalized/.
 1.6 17-Jan-2022  andvar fix typos in comments, mainly s/foward/forward/.
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file dfsub.c was added on branch gehenna-devsw on 2002-07-14 17:47:39 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file dfsub.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divsfm.c was added on branch gehenna-devsw on 2002-07-14 17:47:39 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divsfm.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divsfr.c was added on branch gehenna-devsw on 2002-07-14 17:47:40 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divsfr.c was added on branch kqueue on 2002-06-23 17:37:12 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divsim.c was added on branch gehenna-devsw on 2002-07-14 17:47:40 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divsim.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divsir.c was added on branch gehenna-devsw on 2002-07-14 17:47:40 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divsir.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divu.S was added on branch gehenna-devsw on 2002-07-14 17:47:41 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divu.S was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divufr.c was added on branch gehenna-devsw on 2002-07-14 17:47:41 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divufr.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file divuir.c was added on branch gehenna-devsw on 2002-07-14 17:47:41 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file divuir.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.6 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.5 22-Feb-2007  thorpej branches: 1.5.80; 1.5.84;
TRUE -> true, FALSE -> false
 1.4 11-Dec-2005  christos branches: 1.4.26;
merge ktrace-lwp.
 1.3 01-Nov-2003  matt branches: 1.3.16;
Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fcnvff.c was added on branch gehenna-devsw on 2002-07-14 17:47:42 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fcnvff.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.3.16.1 26-Feb-2007  yamt sync with head.
 1.4.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.5.84.1 18-Feb-2012  mrg merge to -current.
 1.5.80.1 17-Apr-2012  yamt sync with head
 1.6 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.5 01-Jan-2012  skrll When converting a floating value to an integer, properly raise the "invalid"
exception when the floating value is infinite or NaN or if the integral part
of the floating value exceeds the range of the integer type, as required by
the C99/IEEE754 standard.

Fixes Python 2.6 build on hppa.

From OpenBSD.
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fcnvfx.c was added on branch gehenna-devsw on 2002-07-14 17:47:42 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fcnvfx.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 01-Jan-2012  skrll When converting a floating value to an integer, properly raise the "invalid"
exception when the floating value is infinite or NaN or if the integral part
of the floating value exceeds the range of the integer type, as required by
the C99/IEEE754 standard.

Fixes Python 2.6 build on hppa.

From OpenBSD.
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.116;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fcnvfxt.c was added on branch gehenna-devsw on 2002-07-14 17:47:43 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fcnvfxt.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.3.116.1 18-Feb-2012  mrg merge to -current.
 1.3.112.1 17-Apr-2012  yamt sync with head
 1.4 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.116;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fcnvxf.c was added on branch gehenna-devsw on 2002-07-14 17:47:43 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fcnvxf.c was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.3.116.1 18-Feb-2012  mrg merge to -current.
 1.3.112.1 17-Apr-2012  yamt sync with head
 1.4 27-Jan-2009  skrll From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.

Fixes regress/lib/libc/ieeefp/nan
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.88;
merge ktrace-lwp.
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file float.h was added on branch gehenna-devsw on 2002-07-14 17:47:43 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file float.h was added on branch kqueue on 2002-06-23 17:37:13 +0000
 1.3.88.1 02-Feb-2009  snj Pull up following revision(s) (requested by skrll in ticket #330):
sys/arch/hppa/spmath/dbl_float.h: revision 1.3
sys/arch/hppa/spmath/float.h: revision 1.4
sys/arch/hppa/spmath/sgl_float.h: revision 1.3
From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.
Fixes regress/lib/libc/ieeefp/nan
 1.3.86.1 03-Mar-2009  skrll Sync with HEAD.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fpbits.h was added on branch gehenna-devsw on 2002-07-14 17:47:44 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fpbits.h was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.5 03-Sep-2023  andvar remove duplicate "(unsigned *) &atmp" argument passed to dbl_to_sgl_fcnvfxt().

fixes build with TIMEX option enabled for hppa.
 1.4 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.3 11-Dec-2005  christos branches: 1.3.78; 1.3.86; 1.3.92;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fpudispatch.c was added on branch gehenna-devsw on 2002-07-14 17:47:44 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fpudispatch.c was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.3.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.78.1 04-May-2009  yamt sync with head.
 1.2 06-Apr-2008  skrll de-__P
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file fpudispatch.h was added on branch gehenna-devsw on 2002-07-14 17:47:44 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file fpudispatch.h was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file frnd.c was added on branch gehenna-devsw on 2002-07-14 17:47:44 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file frnd.c was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file hppa.h was added on branch gehenna-devsw on 2002-07-14 17:47:45 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file hppa.h was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file impys.S was added on branch gehenna-devsw on 2002-07-14 17:47:45 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file impys.S was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 10-Oct-2003  chs update for new gas syntax. from Jochen Kunz.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file impyu.S was added on branch gehenna-devsw on 2002-07-14 17:47:45 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file impyu.S was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.5 09-Jul-2025  andvar fix few typos in comments.
 1.4 06-Apr-2008  skrll branches: 1.4.128;
de-__P
 1.3 11-Dec-2005  christos branches: 1.3.74;
merge ktrace-lwp.
 1.2 31-Aug-2003  chs update for LWPs, and some lite cleanup.
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file md.h was added on branch gehenna-devsw on 2002-07-14 17:47:45 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file md.h was added on branch kqueue on 2002-06-23 17:37:14 +0000
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.128.1 02-Aug-2025  perseant Sync with HEAD
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpyaccs.c was added on branch gehenna-devsw on 2002-07-14 17:47:46 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpyaccs.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpyaccu.c was added on branch gehenna-devsw on 2002-07-14 17:47:46 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpyaccu.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpys.c was added on branch gehenna-devsw on 2002-07-14 17:47:46 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpys.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpyscv.c was added on branch gehenna-devsw on 2002-07-14 17:47:47 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpyscv.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpyu.c was added on branch gehenna-devsw on 2002-07-14 17:47:47 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpyu.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file mpyucv.c was added on branch gehenna-devsw on 2002-07-14 17:47:47 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file mpyucv.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.3 28-May-2022  andvar s/grabing/grabbing/ in comments.
 1.2 06-Apr-2008  skrll de-__P
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file quad_float.h was added on branch gehenna-devsw on 2002-07-14 17:47:47 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file quad_float.h was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.7 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.6 14-Mar-2009  dsl branches: 1.6.12; 1.6.16;
Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.5 27-Nov-2006  skrll branches: 1.5.56; 1.5.64; 1.5.70;
Initialise the result rather than returning garbage.
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 01-Nov-2003  matt branches: 1.3.16;
Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file setovfl.c was added on branch gehenna-devsw on 2002-07-14 17:47:48 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file setovfl.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.3.16.1 30-Dec-2006  yamt sync with head.
 1.4.22.1 10-Dec-2006  yamt sync with head.
 1.4.20.1 12-Jan-2007  ad Sync with head.
 1.5.70.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.5.64.1 28-Apr-2009  skrll Sync with HEAD.
 1.5.56.1 04-May-2009  yamt sync with head.
 1.6.16.1 18-Feb-2012  mrg merge to -current.
 1.6.12.1 17-Apr-2012  yamt sync with head
 1.7 31-Jul-2023  andvar fix typos in comments, mainly s/denomalized/denormalized/.
 1.6 17-Jan-2022  andvar fix typos in comments, mainly s/foward/forward/.
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfadd.c was added on branch gehenna-devsw on 2002-07-14 17:47:48 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfadd.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.4 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.3 11-Dec-2005  christos branches: 1.3.112; 1.3.116;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfcmp.c was added on branch gehenna-devsw on 2002-07-14 17:47:48 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfcmp.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.3.116.1 18-Feb-2012  mrg merge to -current.
 1.3.112.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfdiv.c was added on branch gehenna-devsw on 2002-07-14 17:47:48 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfdiv.c was added on branch kqueue on 2002-06-23 17:37:15 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfmpy.c was added on branch gehenna-devsw on 2002-07-14 17:47:48 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfmpy.c was added on branch kqueue on 2002-06-23 17:37:16 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfrem.c was added on branch gehenna-devsw on 2002-07-14 17:47:49 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfrem.c was added on branch kqueue on 2002-06-23 17:37:16 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.6 29-Feb-2016  christos PR/50871: David Binderman: use logical and instead of arithmetic
 1.5 04-Feb-2012  skrll branches: 1.5.6; 1.5.24;
-Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfsqrt.c was added on branch gehenna-devsw on 2002-07-14 17:47:49 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfsqrt.c was added on branch kqueue on 2002-06-23 17:37:16 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.5.24.1 19-Mar-2016  skrll Sync with HEAD
 1.5.6.1 03-Dec-2017  jdolecek update from HEAD
 1.7 31-Jul-2023  andvar fix typos in comments, mainly s/denomalized/denormalized/.
 1.6 17-Jan-2022  andvar fix typos in comments, mainly s/foward/forward/.
 1.5 04-Feb-2012  skrll -Wold-style-definition

Same code before and after. OK riz@
 1.4 22-Feb-2007  thorpej branches: 1.4.80; 1.4.84;
TRUE -> true, FALSE -> false
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.10;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.10.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sfsub.c was added on branch gehenna-devsw on 2002-07-14 17:47:49 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sfsub.c was added on branch kqueue on 2002-06-23 17:37:16 +0000
 1.2.16.1 26-Feb-2007  yamt sync with head.
 1.3.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.4.84.1 18-Feb-2012  mrg merge to -current.
 1.4.80.1 17-Apr-2012  yamt sync with head
 1.4 28-May-2022  andvar s/grabing/grabbing/ in comments.
 1.3 27-Jan-2009  skrll From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.

Fixes regress/lib/libc/ieeefp/nan
 1.2 06-Apr-2008  skrll branches: 1.2.4; 1.2.12; 1.2.14;
de-__P
 1.1 05-Jun-2002  fredette branches: 1.1.2; 1.1.4; 1.1.112;
Added files to support generic HP PA-RISC based machines. hp700-specific
files to follow.
 1.1.112.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 14-Jul-2002  gehenna catch up with -current.
 1.1.4.1 05-Jun-2002  gehenna file sgl_float.h was added on branch gehenna-devsw on 2002-07-14 17:47:49 +0000
 1.1.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.2.1 05-Jun-2002  jdolecek file sgl_float.h was added on branch kqueue on 2002-06-23 17:37:16 +0000
 1.2.14.1 02-Feb-2009  snj Pull up following revision(s) (requested by skrll in ticket #330):
sys/arch/hppa/spmath/dbl_float.h: revision 1.3
sys/arch/hppa/spmath/float.h: revision 1.4
sys/arch/hppa/spmath/sgl_float.h: revision 1.3
From OpenBSD:
apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs
been wrong and thus proven by many and there change it back to
what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html .
also fix spmath to use it's own consts instead of (now) off by one
float.h values thus to avoid any kind of binary changes.
Fixes regress/lib/libc/ieeefp/nan
 1.2.12.1 03-Mar-2009  skrll Sync with HEAD.
 1.2.4.1 04-May-2009  yamt sync with head.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.8 29-Apr-2024  skrll Whitespace
 1.7 03-Aug-2023  mrg ignore "-Warray-bounds" for various low level platform code that knows
how something is setup but technically is undefined behaviour. the
most common here is "extern int end;" and then using offsets of "&end"
that are outside the bounds of this 4-byte integer.

these uses are almost certainly all OK in reality.

found by GCC 12.
 1.6 13-Nov-2018  skrll Apply -fno-delete-null-pointer-checks so PAGE0 is handled correctly

netinstall.lif works again
 1.5 13-Nov-2018  skrll Trailing whitespace
 1.4 29-Aug-2017  christos branches: 1.4.2; 1.4.4;
disable PIE and SSP
 1.3 08-Apr-2017  christos branches: 1.3.6;
centralize vers.c building for standalone programs.
 1.2 21-Feb-2016  christos branches: 1.2.2; 1.2.4;
move the NODEBUG to the boot blocks only.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.2 28-Aug-2017  skrll Sync with HEAD
 1.1.12.1 19-Mar-2016  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile.buildboot was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile.buildboot was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile.buildboot was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.3.6.1 31-Aug-2017  martin Pull up following revision(s) (requested by skrll in ticket #249):
sys/arch/hppa/stand/Makefile.buildboot: revision 1.4
sys/arch/hppa/stand/boot/ld.script: revision 1.2
sys/arch/hppa/stand/Makefile.inc: revision 1.4
disable PIE and SSP
Ensure all data is captured under the edata symbol for srt0.S to relocate
it correctly.
gcc 5.3 marks some data as .data.rel.local, .data.rel or .data.rel.ro
port-hppa/52484: lif images from -8 and HEAD not loadable/bootable over network
 1.4.4.1 10-Jun-2019  christos Sync with HEAD
 1.4.2.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.5 13-Apr-2021  mrg more -fcommon for sources not ready yet
 1.4 29-Aug-2017  christos branches: 1.4.18;
disable PIE and SSP
 1.3 21-Feb-2016  christos branches: 1.3.10;
move the NODEBUG to the boot blocks only.
 1.2 21-Feb-2016  christos No debug, pic, or ctf for standalone code.
- debug makes things not fit
- ctf is useless
- pic does not work with the function call convention standalone uses
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 19-Mar-2016  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile.inc was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile.inc was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile.inc was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3.10.1 31-Aug-2017  martin Pull up following revision(s) (requested by skrll in ticket #249):
sys/arch/hppa/stand/Makefile.buildboot: revision 1.4
sys/arch/hppa/stand/boot/ld.script: revision 1.2
sys/arch/hppa/stand/Makefile.inc: revision 1.4
disable PIE and SSP
Ensure all data is captured under the edata symbol for srt0.S to relocate
it correctly.
gcc 5.3 marks some data as .data.rel.local, .data.rel or .data.rel.ro
port-hppa/52484: lif images from -8 and HEAD not loadable/bootable over network
 1.4.18.1 17-Apr-2021  thorpej Sync with HEAD.
 1.2 04-May-2024  skrll Whitespace
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file boot.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file boot.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file boot.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file bootinfo.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file bootinfo.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file bootinfo.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file bootinfo.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file bootinfo.h was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file bootinfo.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file conf.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file conf.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file conf.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 29-Aug-2017  skrll Ensure all data is captured under the edata symbol for srt0.S to relocate
it correctly.

gcc 5.3 marks some data as .data.rel.local, .data.rel or .data.rel.ro

port-hppa/52484: lif images from -8 and HEAD not loadable/bootable over network
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.28;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.28.1 31-Aug-2017  martin Pull up following revision(s) (requested by skrll in ticket #249):
sys/arch/hppa/stand/Makefile.buildboot: revision 1.4
sys/arch/hppa/stand/boot/ld.script: revision 1.2
sys/arch/hppa/stand/Makefile.inc: revision 1.4
disable PIE and SSP
Ensure all data is captured under the edata symbol for srt0.S to relocate
it correctly.
gcc 5.3 marks some data as .data.rel.local, .data.rel or .data.rel.ro
port-hppa/52484: lif images from -8 and HEAD not loadable/bootable over network
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file ld.script was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file ld.script was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file ld.script was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file tgets.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file tgets.c was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file tgets.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file version was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file version was added on branch yamt-pagecache on 2014-05-22 11:39:50 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file version was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cdboot.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cdboot.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cdboot.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file conf.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file conf.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file conf.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 01-Sep-2017  skrll Use the same linker script as sys/arch/hppa/stand/boot and fix the gcc
5.3 problem here as well.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.28;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.28.1 01-Sep-2017  martin Pull up following revision(s) (requested by skrll in ticket #260):
sys/arch/hppa/stand/cdboot/ld.script: revision 1.2
Use the same linker script as sys/arch/hppa/stand/boot and fix the gcc
5.3 problem here as well.
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file ld.script was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file ld.script was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file ld.script was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file version was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file version was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file version was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file cons.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file cons.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file cons.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file ct.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file ct.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file ct.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 26-Mar-2014  christos branches: 1.2.4; 1.2.6; 1.2.10;
kill sprintf
 1.1 24-Feb-2014  skrll Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 26-Mar-2014  tls file dev_hppa.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 26-Mar-2014  yamt file dev_hppa.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 26-Mar-2014  rmind file dev_hppa.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file dev_hppa.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file dev_hppa.h was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file dev_hppa.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file dk.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file dk.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file dk.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file exec_hppa.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file exec_hppa.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file exec_hppa.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file exec_som.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file exec_som.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file exec_som.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file itecons.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file itecons.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file itecons.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lf.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lf.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lf.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file libsa.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file libsa.h was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file libsa.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 04-Sep-2018  riastradh Fix some min/max -> uimin/uimax stragglers.

Confirmed by the 2018-09-04T04:40Z autobuild.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file lif.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file lif.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file lif.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file machdep.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file machdep.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file machdep.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file milli_tiny.S was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file milli_tiny.S was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file milli_tiny.S was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.4 08-Jan-2019  christos no need for <machine/param.h>
 1.3 08-Jan-2019  christos Include <sys/param.h> for DEV_BSIZE/DEV_BSHIFT
 1.2 05-Sep-2018  riastradh One more min->uimin straggler confirmed by 201809042300Z autobuild.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.34; 1.1.36;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.36.1 10-Jun-2019  christos Sync with HEAD
 1.1.34.2 18-Jan-2019  pgoyette Synch with HEAD
 1.1.34.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file pdc.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file pdc.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file pdc.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file srt0.S was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file srt0.S was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file srt0.S was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file time.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file time.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file time.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.5 31-Oct-2024  gutteridge mkboot.c: ensure all functions are declared

Addresses build failure issue on current Linux distros that have a GCC
with implicit-function-declaration baked in as an error. Use be32toh(3)
instead of ntohl(3), seems to make more sense stylistically. Build
tested on Fedora 40.

Issue reported by Jan-Benedict Glaw. Also relevant to PR lib/58674.
 1.4 20-Mar-2024  christos branches: 1.4.2;
remove extra stat (Jan-Benedict Glaw)
 1.3 08-Feb-2024  christos PR/57911: Jan-Benedict Glaw: Allow to set repro timestamp (and use it)
 1.2 21-Jan-2016  christos branches: 1.2.48;
PR/50684: David Binderman: Fix memory leak
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 19-Mar-2016  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file mkboot.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file mkboot.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file mkboot.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.48.1 15-Dec-2024  martin Pull up following revision(s) (requested by gutteridge in ticket #1019):

sys/arch/hppa/stand/mkboot/mkboot.c: revision 1.5
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c: revision 1.21
usr.bin/elf2aout/elf2aout.c: revision 1.25

mkboot.c: ensure all functions are declared

Addresses build failure issue on current Linux distros that have a GCC
with implicit-function-declaration baked in as an error. Use be32toh(3)
instead of ntohl(3), seems to make more sense stylistically. Build
tested on Fedora 40.

Issue reported by Jan-Benedict Glaw. Also relevant to PR lib/58674.


elf2aout.c: switch to use htobe32(3)

As discussed on tech-toolchain. Tested with virt68k tools build on
Fedora 40. (Relevant to PR lib/58674.)


mkbootimage.c: consistently use sa_htobe32(2)

There were 38 calls to sa_htobe32(2) and two to htonl(3), mixed even
within the same function, with arpa/inet.h not included. (It's unclear
why this varied, as the original version of this file first checked in
included this discrepancy.)

Addresses build failure issue on current Linux distros that have a GCC
with implicit-function-declaration baked in as an error. Build tested
on Fedora 40.

Issue reported by Jan-Benedict Glaw. Also relevant to PR lib/58674.
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 29-Apr-2024  skrll Whitespace
 1.5 29-Apr-2024  skrll Ensure a user specified DBG isn't used for xxboot.
 1.4 13-Jan-2023  martin Avoid 64bit math in the hppa first stage bootloader. Ok chs@
 1.3 13-Nov-2018  skrll branches: 1.3.30;
Apply -fno-delete-null-pointer-checks so PAGE0 is handled correctly

netinstall.lif works again
 1.2 21-Feb-2016  christos branches: 1.2.16; 1.2.18;
move the NODEBUG to the boot blocks only.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 19-Mar-2016  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file Makefile was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file Makefile was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file Makefile was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2.18.1 10-Jun-2019  christos Sync with HEAD
 1.2.16.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.30.1 15-May-2023  martin Pull up following revision(s) (requested by chs in ticket #168):

sys/sys/types.h: revision 1.106
sys/arch/hppa/stand/xxboot/Makefile: revision 1.4

Avoid 64bit math in the hppa first stage bootloader. Ok chs@
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file README.ipl was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file README.ipl was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file README.ipl was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 13-Dec-2015  christos PR/50532: David Binderman: Add missing fclose.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file iplsum.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file iplsum.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file iplsum.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file main.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file main.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file main.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file readufs.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file readufs.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file readufs.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3 23-Aug-2015  dholland Sync lfs changes with the x68k version of this code.
 1.2 20-Aug-2015  christos minimal changes to get this to compile.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 22-Sep-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file readufs.h was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file readufs.h was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file readufs.h was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.2 17-Nov-2022  chs Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems
from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended
attributes in the process).
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file readufs_ffs.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file readufs_ffs.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file readufs_ffs.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.3 20-Aug-2015  christos minimal changes to get this to compile.
 1.2 28-Jul-2015  christos fix build.
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10; 1.1.12;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.12.1 22-Sep-2015  skrll Sync with HEAD
 1.1.10.3 03-Dec-2017  jdolecek update from HEAD
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file readufs_lfs.c was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file readufs_lfs.c was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file readufs_lfs.c was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000
 1.1 24-Feb-2014  skrll branches: 1.1.4; 1.1.6; 1.1.10;
Rename NetBSD/hp700 to NetBSD/hppa.

Unfortunately our VCS isn't very helpful here.
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 24-Feb-2014  tls file start.S was added on branch tls-maxphys on 2014-08-20 00:03:05 +0000
 1.1.6.2 22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.6.1 24-Feb-2014  yamt file start.S was added on branch yamt-pagecache on 2014-05-22 11:39:51 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 24-Feb-2014  rmind file start.S was added on branch rmind-smpnet on 2014-05-18 17:45:11 +0000

RSS XML Feed