Home | History | Annotate | Download | only in include
History log of /src/sys/arch/powerpc/include/pmap.h
RevisionDateAuthorComments
 1.43  15-Dec-2023  rin powerpc: Make sure direct-mapped buffer fits within correct range

For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped.

Part of PR kern/57621
 1.42  07-May-2022  rin branches: 1.42.4;
Try to fix PV tracking support.

* For oea (with real PV tracking support):

Define __HAVE_PMAP_PV_TRACK. Otherwise, pmap_pv_init() is not called by
uvm_init().

* For booke and ibm4xx (without PV tracking support):

For MODULAR kernel and modules, define __HAVE_PMAP_PV_TRACK together with
PMAP_PV_TRACK_ONLY_STUBS, so that modules can be shared with oea.

Note that PMAP_PV_TRACK_ONLY_STUBS can be used even for oea,
as a compile-time option to strip real PV tracking support.
 1.41  16-Feb-2022  riastradh powerpc: Implement pv-tracking for unmanaged pages.

Needed for drm.
 1.40  06-Jul-2020  rin Fix comments. No binary changes.
 1.39  27-Jun-2020  rin Fix MODULAR support for ibm4xx by providing __nothing as VM_MDPAGE_INIT().
 1.38  20-Jun-2011  matt Readd powerpc/include/vmparam.h to the set lists
Export it to powerpc/include.h
Protect pmap.h and vmparam.h from getting an #error when included
from userland.
Export safe definitions of VM_MAXUSER_ADDRESS, VM_MIN_ADDRESS,
VM_MAX_ADDRESS when _RUMPKERNEL is defined.
 1.37  20-Jun-2011  matt PowerPC now exports a common view of cpu.h, vmparam.h and pmap.h
when building a MODULAR kernel or compiling _MODULE.
It should be noted that MODULAR or _MODULE export a view of the kernel
as being MULTIPROCESSOR (even if isn't).
The shared pmap TLB uses mdpg in places where it used mdpg to avoid
deadly embrance inclusion problems.
 1.36  20-Jun-2011  matt Add #error for unknown PPC variant
Now that oea calls cpu_fixup_stubs, we don't need pmap_fixup_stubs.
 1.35  09-Mar-2010  matt branches: 1.35.8;
Include BookE version of pmap.h
 1.34  09-Dec-2008  pooka branches: 1.34.4;
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.33  05-Aug-2006  sanjayl branches: 1.33.58; 1.33.62; 1.33.68; 1.33.70; 1.33.82;
1st cut of Powermac G5 support (uses bridge mode).
 1.32  05-Feb-2003  matt branches: 1.32.18; 1.32.32; 1.32.36;
Don't define pmap_t if _LOCORE is defined.
 1.31  04-Feb-2003  matt LKM's need a pmap_t typedef but there's no PPC_xxx to defined which pmap.h
to include. So just declare the pmap_t and don't do anything else.
 1.30  03-Feb-2003  matt Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.29  03-Feb-2003  matt More cleanup for OLDPMAP.
 1.28  03-Nov-2002  matt Change _MACHINE_foo_H_ to _POWERPC_foo_H_
 1.27  22-Sep-2002  chs it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not. doh.
 1.26  22-Sep-2002  chs add pmap_remove_all() hook (empty on most platforms so far).
 1.25  23-Sep-2001  chs branches: 1.25.4;
implement pmap_wired_count().
 1.24  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.23  10-Jun-2001  tsubai branches: 1.23.2; 1.23.4;
Make the new pmap optional. Use the old (stable!) pmap by default.
 1.22  06-Jun-2001  matt Introduce a new & faster pmap for the MPC6xx (60x, 7xx, 7xxx) PPC CPUs.
Move MPC6xx dependent header files to powerpc/include/mpc6xx/
 1.21  22-Apr-2001  thorpej Undo a misguided previous change to the pmap_update() API.
 1.20  22-Apr-2001  thorpej Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
 1.19  21-Apr-2001  thorpej #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
 1.18  04-Feb-2001  briggs branches: 1.18.2;
Build with -Wall -Wetc.
 1.17  30-Mar-2000  jdolecek Prototype vtophys() before defining it. Needed for compilation with
-Wstrict prototypes on macppc.

Problem noted by Hans-Christian Becker <hcb@phc.chalmers.se> in private mail.
 1.16  12-Sep-1999  chs branches: 1.16.2;
eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
 1.15  11-Jul-1999  tsubai Adapt pmap_extract() change.
 1.14  08-Jul-1999  thorpej Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
 1.13  17-Jun-1999  thorpej pmap_change_wiring() -> pmap_unwire().
 1.12  16-Apr-1999  thorpej Use the same hack as pmap_zero_page() and pmap_copy_page() to provide
direct-mapped pool pages.
 1.11  05-Mar-1999  tsubai branches: 1.11.4;
Add RSS accounting.
 1.10  26-Feb-1999  tsubai Implement pmap_procwr().
(Not tested. gdb doesn't work on powerpc yet.)
 1.9  01-Sep-1998  tsubai Add some prototypes.
 1.8  31-Aug-1998  tsubai vm_offset_t --> [pv]addr_t
 1.7  25-Jul-1998  tsubai Make vtophys() return non-zero even if the addr < end.
 1.6  27-Jan-1998  sakamoto Import DDB from OpenBSD/powerpc.
 1.5  06-Jan-1998  thorpej Don't need __VM_PMAP_HACK anymore.
 1.4  03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.3  02-Jan-1998  thorpej Implement pmap_activate().
 1.2  16-May-1997  gwr Add #define __VM_PMAP_HACK as a temporary measure.
 1.1  30-Sep-1996  ws PowerPC port
 1.11.4.2  02-Aug-1999  thorpej Update from trunk.
 1.11.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.16.2.3  23-Apr-2001  bouyer Sync with HEAD.
 1.16.2.2  11-Feb-2001  bouyer Sync with HEAD.
 1.16.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.18.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.23.4.1  01-Oct-2001  fvdl Catch up with -current.
 1.23.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.23.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.23.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.25.4.3  11-Nov-2002  nathanw Catch up to -current
 1.25.4.2  18-Oct-2002  nathanw Catch up to -current.
 1.25.4.1  23-Sep-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-10-18 02:39:31 +0000
 1.32.36.1  11-Aug-2006  yamt sync with head
 1.32.32.1  09-Sep-2006  rpaulo sync with head
 1.32.18.1  30-Dec-2006  yamt sync with head.
 1.33.82.1  07-Jan-2011  matt Add booke support.
 1.33.70.1  19-Jan-2009  skrll Sync with HEAD.
 1.33.68.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.33.62.2  11-Mar-2010  yamt sync with head
 1.33.62.1  04-May-2009  yamt sync with head.
 1.33.58.1  17-Jan-2009  mjf Sync with HEAD.
 1.34.4.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.35.8.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.42.4.1  29-Dec-2023  martin Additionally pull up following revision(s) (requested by rin in ticket #400):

sys/arch/powerpc/include/oea/pmap.h: revision 1.39
sys/arch/powerpc/include/pmap.h: revision 1.43
sys/arch/powerpc/oea/pmap_kernel.c: revision 1.14
sys/arch/powerpc/oea/pmap.c: revision 1.117
sys/arch/powerpc/oea/pmap.c: revision 1.118
sys/arch/powerpc/oea/pmap.c: revision 1.119
sys/arch/powerpc/include/vmparam.h: revision 1.27
sys/arch/powerpc/powerpc/trap.c: revision 1.165
sys/arch/powerpc/oea/pmap.c: revision 1.120
sys/arch/powerpc/oea/pmap.c: revision 1.121
sys/arch/powerpc/powerpc/vm_machdep.c: revision 1.106
sys/arch/powerpc/powerpc/bus_dma.c: revision 1.56

powerpc/oea: trap: pmap_{pte,ste}_spill() even in the interrupt context

Page table for oea is something like L2 TLB on memory; kernel and
processes share its entries, and process entries can be spilled out.

As done for MMU based on software-managed TLB, we need to restore
such entries even in the interrupt context.

Note that pmap_pte_spill() require no resouce to restore entries.
Still-not-implemented pmap_ste_spill() for OEA64 should also.
Part of PR kern/57621

powerpc/oea: pmap: Drop unused argument for pmap_pvo_reclaim(), NFC
Part of PR kern/57621

powerpc/oea: pmap: Rework pmap_pte_spill()

It was broken in many ways... Now, it gets working stable both for
OEA and OEA64_BRIDGE, as far as I can see.
Part of PR kern/57621

powerpc/oea: pmap: Fix mostly-pointless overhead of pmap_pvo_pool
(1) Drop __aligned(32) from struct pvo_entry; otherwise,
sizeof(struct pvo_entry) is round-up'ed to a multiple of 32.
(2) Do not set sizeof(struct pvo_entry) to `align` argument for
pool_init(9); it must be power of 2.
(3) Align pvo_entry to 32-byte boundary only if reasonably possible,
i.e., OEA without DIAGNOSTIC (--> POOL_REDZONE) for now.
Part of PR kern/57621

powerpc/oea: pmap_create: Use PR_ZERO and drop memset(9), NFC
Part of PR kern/57621

powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory
As done for OEA. Note that kva over 3GiB is reserved.

Provide PMAP_MAP_POOLPAGE for OEA64_BRIDGE at the same time, by
which direct-mapped memory is utilized in order to work around
starvation of 512MiB kernel virtual space.
PR kern/57621

powerpc: Make sure direct-mapped buffer fits within correct range

For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped.
Part of PR kern/57621

RSS XML Feed