Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/m68k



Module Name:    src
Committed By:   thorpej
Date:           Sat Nov  8 07:30:05 UTC 2025

Added Files:
        src/sys/arch/m68k/include: pmap_68k.h
        src/sys/arch/m68k/m68k: pmap_68k.c

Log Message:
New pmap module for m68k systems with 68k (68851, 68030, 68040, 68060)
MMUs (plus the mostly-68851-alike HP MMU).

The main feature of this implementation is to properly support the
hardware-mandated 3-level table topology on the 68040/68060, which
should eliminate the "out of address space" problems encountered on
such systems in the classical "Hibler" pmap (into which 68040 support
was "temporarily" shoehorned in nearly 30 years ago).

The code fully supports 2-level (as mandated by the HP MMU) and 3-level
layouts (as mandated by the 68040/68060).  68851/68030 currently use
2-level (as was the case in the Hibler pmap), but eventually will be
switched over to use the 3-level configuration (it's slightly more
memory efficient for typical sparsely-populated address spaces, as
happens with shared libraries).  The code paths for both table topologies
are mostly unified: the leaf tables are kept in a tree indexed by the
"segment" that is mapped by that table, and the tree is the interface
that most of the module uses when interacting with page tables; only when
new tables need to be allocated do we have to handle the 2- vs 3-level
differences.

This new module also adopts several improvements made to the pmap
interface in the years since the Hibler pmap was written, which
should improve the performance of exec and process exit, as well as
overall memory usage.

This is a work-in-progress and not fully ready for prime time:
- It has been developed on virt68k and can boot multi-user in that
  environment, but there is a known crash that happens because
  pmap_growkernel() is not yet implemented.
- It has not yet been tested on a real 68040.
- It has not yet been tested on a real or emulated 68030.
- It has not yet been tested on a HP 9000/320 or 9000/350 (HP MMU).
- There is plenty of room for optimization, especially with regards to
  ATC and cache handling (the existing m68k "cacheops" painted me into
  a corner).
- A new libkvm module for this pmap will be required.  Happily, there
  is a way to implement this new libkvm module and associated kcore hdr
  so that it will work with this new pmap, the Hibler pmap, as well as
  the Sun3x pmap (which is yet another pmap module for 68030, but
  completely different in design).
- Some adaptation of an individual port is needed, and the pmap_bootstrap1()
  function provided by this new module will need to gain some capabilities
  in order to be adaptable to systems more complicated than virt68k.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/m68k/include/pmap_68k.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/m68k/m68k/pmap_68k.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index