Home | History | Annotate | Download | only in include
History log of /src/sys/arch/vax/include/pmap.h
RevisionDateAuthorComments
 1.82  21-Mar-2020  ad PR port-vax/55094: vax pmap needs locking adjustments

Make the adjustments noted in the PR and don't call uvm_wait() or do
WAITOK ever - UVM takes care of that.
 1.81  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.80  24-May-2011  matt branches: 1.80.56;
Remove pmap's simple_lock; switch to atomic ops
Change pvtable simple_lock to mutex
Switch to kmem (goodbye malloc).
 1.79  14-Nov-2010  uebayasi branches: 1.79.2;
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.78  12-Nov-2010  uebayasi Pull in uvm/uvm.h for VM_PAGE_TO_PHYS().
 1.77  21-Oct-2009  rmind branches: 1.77.2; 1.77.4;
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.76  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.75  11-Mar-2008  matt branches: 1.75.4; 1.75.10; 1.75.12;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.
 1.74  22-Feb-2008  matt Fix a bug in the pmap pcb tracking code. While here, rewrite it to simplier.
Use a field in the pcb itself (since it's basically free) and keep track of
what pmap "owns" a pcb (for consistency checking). use M_ZERO as appropriate.
 1.73  03-Feb-2008  matt branches: 1.73.2; 1.73.6;
Add PMAP_VTOPHYS
 1.72  04-Jan-2008  joerg Needs sys/simplelock.h.
 1.71  22-Feb-2007  thorpej branches: 1.71.22; 1.71.28; 1.71.34;
TRUE -> true, FALSE -> false
 1.70  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.69  19-Feb-2007  chs in pmap_extract(), check for the PTE being valid in addition to
the PTP being valid when deciding if a user mapping exists.
 1.68  08-Jul-2006  matt branches: 1.68.8; 1.68.10;
Reorganize pmap_extract so that *pap is always set to quash gcc4
uninitialized use warnings.
 1.67  15-Apr-2006  matt branches: 1.67.4;
No reason to do *(vaddr_t *)& dance. We only assign to vaddr_t
 1.66  12-Mar-2006  matt branches: 1.66.2;
Fix various places where assignment happen to casted lvalues.
(t)v = foo; is not legal C.
 1.65  16-Feb-2006  perry branches: 1.65.2; 1.65.4;
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.64  16-Jan-2006  is branches: 1.64.2; 1.64.4;
pmap_is_referenced - copied from pmap_clear_reference, reviewd by ragge@
 1.63  24-Dec-2005  perry branches: 1.63.2;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.62  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.61  11-Dec-2005  christos merge ktrace-lwp.
 1.60  14-Dec-2003  ragge branches: 1.60.16;
TOPDOWN_VM is now mandatory on vax.
 1.59  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.58  02-Mar-2003  ragge branches: 1.58.2;
Change the pmap to use 512-byte pages as user page table pages instead of
PAGE_SIZE pages (4k). An average small program uses ~6 4k pages (24k),
while the same program only uses ~20 512 byte pages (10k), so it will be
a small memory usage improvement. The large improvement will be the upcoming
ability to share page table pages between processes for shared libraries.

Remaining: should be able to give back ptp pages to the system.
 1.57  26-Feb-2003  ragge Enable USE_TOPDOWN_VM. This also makes it possible to use large address
spaces, so bump MAXDSIZ to 1GB.
 1.56  22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.55  22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.54  13-May-2002  matt Eliminate commons.
 1.53  21-Mar-2002  ragge Inline functions that mostly do not need to be called. Partly
rearrange/change the code to be able to avoid some inefficient functions.
Profiling shows that the time spent in pmap now is decreased by 20%. (!)
 1.52  10-Mar-2002  ragge Major update of the vax pmap:
- Reinstall the "dynamic page table length" that was removed some
years ago.
- Limit the user page table submap to max 5% of available memory.
- Free the page table space when a process is swapped out.
- If the UPT submap runs out of space, throw away pmap mappings
using the same algorithm as for swapping processes.

As a result of this, 4MB machines are useable again and it's even possible
to compile a kernel for 2MB machines (but it will be slow... :-)

Still to do:
- Multiprocessor fixes.
- More profiling.
 1.51  01-Mar-2002  ragge usrptsize was not correct calculated, fixed.
Add space to system page table for the UVM kernel area.
This fixes the KVM usage problem that Manuel Bouyer reported a while ago.
 1.50  24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.49  24-Sep-2001  chs branches: 1.49.4;
implement pmap_wired_count().
 1.48  10-Sep-2001  chris Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

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

Reviewed by Jason.
 1.47  31-Aug-2001  simonb branches: 1.47.2;
Use comments around the token after a #endif.
 1.46  04-Jun-2001  ragge branches: 1.46.2;
The beginning of pmap locks. While here, some cleaning and KNF.
 1.45  26-May-2001  chs replace vm_page_t with struct vm_page *.
 1.44  22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.43  22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.42  21-Apr-2001  thorpej pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations. Since these pmaps don't
defer anything, pmap_update() is a noop.
 1.41  21-Nov-2000  chs branches: 1.41.2;
eliminate TRUNC_PAGE() and ROUND_PAGE() in favor of their
lowercase counterparts. also, a little misc cleanup.
 1.40  08-Aug-2000  ragge Remove some unneccessary TBIA's. Keep track of wired pages.
Fix PR#8503 (refcount error).
 1.39  19-Mar-2000  ragge branches: 1.39.4;
First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.
 1.38  04-Mar-2000  matt expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c
 1.37  01-Aug-1999  ragge branches: 1.37.2;
A bunch of changes:
- Free pte pages not in use anymore.
- Inline pmap_extract().
- Fix annoying page reference/modify bug. Fixes PR#7858 & PR#7859.
 1.36  30-Jun-1999  ragge Use pmap_steal_memory() for early memory allocation.
 1.35  17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.34  17-Jun-1999  thorpej Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
 1.33  14-Apr-1999  ragge Use the pool allocator for mbufs instead of a separate submap.
 1.32  24-Mar-1999  mrg branches: 1.32.4;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.31  19-Jan-1999  ragge Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.
 1.30  01-Jan-1999  ragge Giant change: NBPG now set to 4k and CLSIZE == 1 for vax. This change
made a whole bunch of annoying bugs disappear; mostly depending on
bad use of NBPG in non-MD code. The VAX port was the only port that
used this historical "feature".

The CL* macros should probably go away totally, there is no reason
at all to keep them.
 1.29  29-Nov-1998  ragge - Save R/M bits after a page is unmapped.
- Keep track of mapping count (for statistics).
- vm_offset_t -> vaddr_t/paddr_t.
- Move away counting of available memory.
 1.28  21-Aug-1998  ragge VAX logical page size increased to 4k.
 1.27  03-May-1998  ragge Remove the ancient kernel-stack area at top of P1 region. Make PMAP_NEW
almost work. Also Wall cleaning.
 1.26  18-Feb-1998  cgd Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
 1.25  31-Jan-1998  ragge Re-implement page reference bit emulation by using the (otherwise unused)
valid bit. This is faster than the "unmap all" solution that were described
in that Mach paper _and_ it eliminates the need for checking the wired bit.
As a result of this; swapping started working again on vax :-)
 1.24  18-Jan-1998  ragge Fix page size initialisation.
 1.23  03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.22  03-Jan-1998  thorpej - Remove the PCB pointer from the pmap structure. Instead, store the
page {0,1} base and length registers in the pmap structure. They will
be loaded in to the PCB when the process's address space is activated
by way of pmap_activate().
- Remove pmap_pinit() macro; it's now a real function.
- Prototypes for pmap_pinit(), pmap_activate(), pmap_deactivate().
 1.21  05-Nov-1997  thorpej asm -> __asm__
 1.20  02-Nov-1997  ragge Major rewriting, optimization and simplifying of the pmap code:

- Map in all physical memory first in system space. This reduces
pmap_copy_page() and pmap_zero_page to 3 resp. 2 instructions.
- Have fized position user page tables. Makes the pv_table smaller
and all reverse references faster (and simpler).
- Remove the wiring code. Nobody doesn't even know what a DR32 is anymore.
- Simulate page reference bit by setting page invalid, as suggested by
Rich Draves in a paper for 1991 Mach Usenix Symposium.

This reduced the time spent in the pmap module to between 70-75% of
the previous; and made process startup _much_ faster.
 1.19  06-Jul-1997  ragge Remove __VM_PMAP_HACK.
 1.18  16-May-1997  gwr Add #define __VM_PMAP_HACK as a temporary measure.
 1.17  20-Jul-1996  ragge Numerous changes to be able to put Bertram Barth's VAXstation support in.
(Some) Support for VAXstation 2000/MicroVAX 2000, VAXstation 3100/76.
 1.16  08-Apr-1996  ragge Added prototypes to everything. Made all files compile with -Wall.
 1.15  09-Mar-1996  ragge We lost declaration of kernel_pmap_store somewhere, put it back.
 1.14  07-Mar-1996  ragge Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.
 1.13  11-Feb-1996  ragge PAGE_SIZE should be PAGE_SHIFT. Really ugly bug!
 1.12  02-Feb-1996  mycroft Fix #includes.
 1.11  12-Nov-1995  ragge Macros for locore mapping added.
 1.10  11-May-1995  jtc KERNEL -> _KERNEL
 1.9  05-May-1995  ragge BROKEN_SWAP removed, swapping verified OK.
pmap_collect(pmap) added as null define.
 1.8  12-Apr-1995  ragge Added regs for trace.
 1.7  10-Apr-1995  mycroft Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
 1.6  13-Feb-1995  ragge Lots of fixes...
 1.5  25-Nov-1994  ragge Lots of updates & fixes.
 1.4  26-Oct-1994  cgd new RCS ID format.
 1.3  08-Oct-1994  ragge Changes to make files more 4.4/1.0B working.
 1.2  16-Aug-1994  ragge branches: 1.2.2;
Minor updates of some errouneous parameters.
 1.1  02-Aug-1994  ragge Initial VAX port merging.
 1.2.2.2  16-Aug-1994  ragge Minor updates of some errouneous parameters.
 1.2.2.1  16-Aug-1994  ragge file pmap.h was added on branch netbsd-1-0 on 1994-08-16 23:41:57 +0000
 1.32.4.3  02-Aug-1999  thorpej Update from trunk.
 1.32.4.2  01-Jul-1999  thorpej Sync w/ -current.
 1.32.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.37.2.3  23-Apr-2001  bouyer Sync with HEAD.
 1.37.2.2  22-Nov-2000  bouyer Sync with HEAD.
 1.37.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.39.4.1  13-Aug-2000  ragge Pull up revisions (requested by ragge):
pmap.c 1.85-1.86
pmap.h 1.40

Remove some unneccessary TBIA's. Keep track of wired pages.
Fix PR#8503 (refcount error).
 1.41.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.46.2.5  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.46.2.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.46.2.3  16-Mar-2002  jdolecek Catch up with -current.
 1.46.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.46.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.47.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.49.4.5  18-Oct-2002  nathanw Catch up to -current.
 1.49.4.4  20-Jun-2002  nathanw Catch up to -current.
 1.49.4.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.49.4.2  28-Feb-2002  nathanw Catch up to -current.
 1.49.4.1  24-Sep-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-02-28 04:12:29 +0000
 1.58.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.58.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.58.2.1  03-Aug-2004  skrll Sync with HEAD
 1.60.16.7  17-Mar-2008  yamt sync with head.
 1.60.16.6  27-Feb-2008  yamt sync with head.
 1.60.16.5  04-Feb-2008  yamt sync with head.
 1.60.16.4  21-Jan-2008  yamt sync with head
 1.60.16.3  26-Feb-2007  yamt sync with head.
 1.60.16.2  30-Dec-2006  yamt sync with head.
 1.60.16.1  21-Jun-2006  yamt sync with head.
 1.63.2.2  18-Feb-2006  yamt sync with head.
 1.63.2.1  01-Feb-2006  yamt sync with head.
 1.64.4.1  22-Apr-2006  simonb Sync with head.
 1.64.2.1  09-Sep-2006  rpaulo sync with head
 1.65.4.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.65.2.3  11-Aug-2006  yamt sync with head
 1.65.2.2  24-May-2006  yamt sync with head.
 1.65.2.1  13-Mar-2006  yamt sync with head.
 1.66.2.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.67.4.1  13-Jul-2006  gdamore Merge from HEAD.
 1.68.10.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.68.8.1  10-Mar-2007  bouyer Pull up following revision(s) (requested by chs in ticket #507):
sys/arch/vax/include/pmap.h: revision 1.69
in pmap_extract(), check for the PTE being valid in addition to
the PTP being valid when deciding if a user mapping exists.
 1.71.34.1  08-Jan-2008  bouyer Sync with HEAD
 1.71.28.1  18-Feb-2008  mjf Sync with HEAD.
 1.71.22.2  23-Mar-2008  matt sync with HEAD
 1.71.22.1  09-Jan-2008  matt sync with HEAD
 1.73.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.73.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.73.2.1  24-Mar-2008  keiichi sync with head.
 1.75.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.75.10.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.75.4.2  11-Mar-2010  yamt sync with head
 1.75.4.1  04-May-2009  yamt sync with head.
 1.77.4.2  31-May-2011  rmind sync with head
 1.77.4.1  05-Mar-2011  rmind sync with head
 1.77.2.2  16-Nov-2010  uebayasi Sync with HEAD.
 1.77.2.1  27-May-2010  uebayasi Fix build.
 1.79.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.80.56.1  08-Apr-2020  martin Merge changes from current as of 20200406

RSS XML Feed