M680[12346] are now available from opt_m68k_arch.h. FPSP meantioned
in the PR has already been fixed, and i could not find any more.
i built these kernels to ensure i did not break their builds:
amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
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.
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries
Now page size dependent numbers are almost replaced with proper macro.
Tested on atari, hp300, and news68k.
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.
XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
(that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro
Tested on atari, hp300, and news68k.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.
Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().
Tested on atari, hp300, mac68k, and news68k.
XXX: Why is protection_codes[] array initialized at run time?
- for 040/060, move L2 descs for Sysptmap from the last L2 block in segment
table pages to the contiguous block with ones for segment table mappings
- for 020/030, invalidate ste and pte entries separately since
ste size (TIA_SIZE) and pte size (TIB_SIZE) could be different
on 8KB/page systems
Tested on hp300 (040), mac68k (LC040), and news68k (030)
(and untested on others).
XXX: some more stuff in pmap_bootstrap.c could be moved into
XXX: common pmap_bootstrap_finalize()?
between other page tables to use different mappings for ste/pte pages
as well as amiga and atari. Should resolve XXX comments in next68k and x68k.
Tested on hp300 and mac68k.
- 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>.
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.
Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
<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)
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.)
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.
XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
(where MMU is not enabled yet) and make kernel_pmap_store static again.
Also consistently use uintptr_t on address conversion in RELOC() macro.
Tested on hp300 (PA != VA) and news68k (PA == VA).
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:
1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.
2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.
I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
suggestion from isaki@ on port-m68k.
For cesfic (compile test only):
- use static splraise4() for splvm() and remove isrcomputeipl() for IPL_VM
because this port supports only one model
- make makeiplcookie(9) return PSL bits via ipl2psl_table[] rather than
ipl indexes
- make ipl2psl_table[] uint16_t rather than int