Provide defaults for VM_PHYSSEG_MAX, VM_PHYSSEG_STRAT (single segment),
VM_NFREELIST, and VM_FREELIST_DEFAULT (single freelist).
Achievement unlocked: some platform <machine/vmparam.h> files are now just
simple wrappers around <m68k/vmparam.h> (and a few more are *very* close).
Centralize the definition of VM_PHYS_SIZE. While doing so, change
the logic for its value, eliminating the obsolete USRIOSIZE constant.
Previously, on Utah-derived platforms, USRIOSIZE was defined as the
number of PTEs used for phys_map, and VM_PHYS_SIZE was USRIOSIZE * PAGE_SIZE.
The USRIOSIZE was in turn derived from NPTEPG (number of PTEs in one page).
On 4K page systems, that was a 4MB phys_map. On 8K page systems, that
was a 16MB phys_map (4x muliplier comes from 2x PTEs per page, 2x bytes
per page mapped). These values are totally excessive; the most pressure
phys_map experiences on a typical system is boot-time fsck, and the max
mapping request it will see is MAXPHYS (64KB); it is generally not used in
steady-state operation. In contrast, alpha's phys_map is 512KB and 32-bit
x86 is ~1MB.
Instead, simply define reasonable values for VM_PHYS_SIZE independent of
PAGE_SIZE: 256KB for 68010, 1MB for everone else. Per-platform constraints
can override these values (although they happen to match what Sun2 and Sun3
use, respectively).
[3 lines not shown]
Enable __USE_TOPDOWN_VM; this was set on sun2 and sun3, but somehow
forgotten on the rest of m68k. (Seriously, why is this even optional?)
Tested on both Utah and new pmap.
x68k: Initialize d_bbsize and d_sbsize on the disklabel always.
These values are for (old) FFS, so it didn't make sense to initialize
only when the BSD disklabel was missing and the Human68k partition existed.
This avoids disklabel(8)'s warnings:
disklabel: boot block size 0
disklabel: super block size 0
Inspired from PR install/59600.
sysinst/x68k: Remove unnecessary conditions in md_disklabe_is_default().
lp->d_bbsize and lp->d_sbsize should be constants (this is probably another
bug) and should not be part of this check.
Fix PR install/59600
Should be pulled up -10 and -11.
Centralize the definition of VM_MIN_ADDRESS, VM_MAX_ADDRESS/VM_MAXUSER_ADDRESS,
and USRSTACK. While here, get rid of the "must be compatible with HP-UX
debuggers" affordance which, really, has outlived its usefulness (and not
all platforms adopted this in any case). Also, since we haven't had "u."
in about a million years, there's also no need to have UPAGES worth of
virtual space above the user stack, so just tuck it right up against
the ceiling everywhere.
Odd-ball is Amiga because it previously had a USRSTACK totally unlike
the others, so I left it that way for now.
sgimips: early initialisation of mach_subtype for SGI Indy / Indigo2
The mach_subtype field is needed early in boot for dev/int.c (the 8254
in the IO block) and other bits and pieces like GIO bus config.
So set it up super early here.
This allows my Indigo 2 R4400PC-150 to boot - slowly until the int driver
enumerates, but that's separate problem I'll dig into.
I also verified my R5000PC-180 Indy boots with this.
This addresses PR port-sgimips/60205 .
sgimips: delete dead code for IP32 console keyboard
The IP32 console keyboard controller is not a PC/AT style 8042
controller. It is a PS/2 controller though. Let it attach
normally, not through here.
Update to match recent cryptodev update
<opencrypto/cryptodev.h> recently changed a bunch of fields from
signed to unsigned. To avoid gcc stupidly complaining about
comparisons of different signedness ints (I mean, how can
for (i = 0; i < unsigned_thing; i++)
ever see i become negative?) change i from int to unsigned int.
Should fix the i386 build.
Fix:
An integer wraparound bug that could cause a NULL pointer exception.
Data sharing issues that could cause data corruption.
Locking issues that could cause double freeing or using free memory.
Issues discovered by nasm and coordinated by VulnCheck
Thank you!
libssh/Makefile: Fix comment about compat libssh.
We _do_ create a private compat libssh, not for the benefit of
applications linked against it (there aren't any, or if there were it
would be a bug) but for the benefit of applications loading
pam_ssh.so which is legitimately linked against libssh.
When I made the change a few months ago to restore building compat
libssh (by not defining NOCOMPAT) I explained this in the commit
message but neglected to update the comment.
PR lib/58648: private shared libraries should go in /usr/lib/private,
not /usr/lib
Update an old temporary usage comment for tzdata
There was a short period (years ago now) when the tzdata2netbsd
script for updating NetBSD HEAD with the current version of tzdata
was not working as desired, and a comment added here indicated that.
That is long since fixed, the script has been used again now for
ages, so remove the comment indicating things were being done by
hand, and instead include usage advice for tzdata2netbsd.
Undo earlier meaningless change
Revert my botched change (rev 1.7, 2026-04-18 19:42:21 +0000) which
had the parens in the wrong place, which made it useless (pointed out
offlist by rillig@ - thanks). The change was made unnecessary by
christos later change (rev 1.8, 2026-04-18 21:37:04 +0000), so there
is no point fixing it, just make it go away.
VM_KERNEL_PT_PAGES is an old-pmap parameter, so segregate it to
the old-pmap, and default it there to a common value that individual
platforms can override if desired.