xref: /freebsd/share/man/man9/pmap.9 (revision bc1eea0c0b0ad0a39b5b22b89341b4af1f0cd21f)
18019c643SBruce M Simpson.\"
28019c643SBruce M Simpson.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
38019c643SBruce M Simpson.\" All rights reserved.
48019c643SBruce M Simpson.\"
58019c643SBruce M Simpson.\" Redistribution and use in source and binary forms, with or without
68019c643SBruce M Simpson.\" modification, are permitted provided that the following conditions
78019c643SBruce M Simpson.\" are met:
88019c643SBruce M Simpson.\" 1. Redistributions of source code must retain the above copyright
98019c643SBruce M Simpson.\"    notice, this list of conditions and the following disclaimer.
108019c643SBruce M Simpson.\" 2. Redistributions in binary form must reproduce the above copyright
118019c643SBruce M Simpson.\"    notice, this list of conditions and the following disclaimer in the
128019c643SBruce M Simpson.\"    documentation and/or other materials provided with the distribution.
138019c643SBruce M Simpson.\"
148019c643SBruce M Simpson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
158019c643SBruce M Simpson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
168019c643SBruce M Simpson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
178019c643SBruce M Simpson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
188019c643SBruce M Simpson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
198019c643SBruce M Simpson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
208019c643SBruce M Simpson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
218019c643SBruce M Simpson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
228019c643SBruce M Simpson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
238019c643SBruce M Simpson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
248019c643SBruce M Simpson.\" SUCH DAMAGE.
258019c643SBruce M Simpson.\"
26*55e2a7d3SRobert Wing.Dd January 12, 2024
278019c643SBruce M Simpson.Dt PMAP 9
28b4ca3754SRuslan Ermilov.Os
298019c643SBruce M Simpson.Sh NAME
308019c643SBruce M Simpson.Nm pmap
318019c643SBruce M Simpson.Nd machine-dependent portion of virtual memory subsystem
328019c643SBruce M Simpson.Sh SYNOPSIS
338019c643SBruce M Simpson.In sys/param.h
348019c643SBruce M Simpson.In vm/vm.h
358019c643SBruce M Simpson.In vm/pmap.h
368019c643SBruce M Simpson.Sh DESCRIPTION
378019c643SBruce M SimpsonThe
388019c643SBruce M Simpson.Nm
398019c643SBruce M Simpsonmodule is the machine-dependent portion of the
408019c643SBruce M Simpson.Fx
418019c643SBruce M SimpsonVM (Virtual Memory) sub-system.
428019c643SBruce M SimpsonEach function documented herein must have its own
438019c643SBruce M Simpsonarchitecture-dependent implementation.
448019c643SBruce M Simpson.Pp
458019c643SBruce M SimpsonThe
468019c643SBruce M Simpson.Nm
478019c643SBruce M Simpsonmodule
488019c643SBruce M Simpsonis responsible for managing hardware-dependent objects such as page tables,
498019c643SBruce M Simpsonaddress maps, TLBs, etc.
508019c643SBruce M Simpson.Pp
518019c643SBruce M SimpsonMachine-dependent code must provide the header file
521772ac3fSRuslan Ermilov.In machine/pmap.h .
538019c643SBruce M SimpsonThis file contains the definition of the
541772ac3fSRuslan Ermilov.Vt pmap
558019c643SBruce M Simpsonstructure:
568019c643SBruce M Simpson.Bd -literal -offset indent
578019c643SBruce M Simpsonstruct pmap {
588019c643SBruce M Simpson        /* Contents defined by pmap implementation. */
598019c643SBruce M Simpson};
608019c643SBruce M Simpsontypedef struct pmap *pmap_t;
618019c643SBruce M Simpson.Ed
628019c643SBruce M Simpson.Pp
638019c643SBruce M SimpsonThis header file may also define other data structures used by the
648019c643SBruce M Simpson.Nm
658019c643SBruce M Simpsonimplementation.
668019c643SBruce M Simpson.Pp
678019c643SBruce M SimpsonThe header file
681772ac3fSRuslan Ermilov.In vm/pmap.h
698019c643SBruce M Simpsondefines a structure for tracking
708019c643SBruce M Simpson.Nm
718019c643SBruce M Simpsonstatistics (see below).
728019c643SBruce M SimpsonThis structure is defined as:
738019c643SBruce M Simpson.Bd -literal -offset indent
748019c643SBruce M Simpsonstruct pmap_statistics {
758019c643SBruce M Simpson        long        resident_count; /* number of mapped pages */
768019c643SBruce M Simpson        long        wired_count;    /* number of wired pages */
778019c643SBruce M Simpson};
788019c643SBruce M Simpson.Ed
798019c643SBruce M Simpson.Pp
801aba005aSBruce M SimpsonThe implementation's
811772ac3fSRuslan Ermilov.Vt "struct pmap"
821aba005aSBruce M Simpsonmust contain an instance of this structure having the name
831aba005aSBruce M Simpson.Va pm_stats ,
841aba005aSBruce M Simpsonand it must be updated by the implementation after each relevant
851772ac3fSRuslan Ermilov.Nm
861aba005aSBruce M Simpsonoperation.
878019c643SBruce M Simpson.Sh SEE ALSO
888019c643SBruce M Simpson.Xr pmap_activate 9 ,
898019c643SBruce M Simpson.Xr pmap_clear_modify 9 ,
908019c643SBruce M Simpson.Xr pmap_copy 9 ,
918019c643SBruce M Simpson.Xr pmap_copy_page 9 ,
928019c643SBruce M Simpson.Xr pmap_enter 9 ,
938019c643SBruce M Simpson.Xr pmap_extract 9 ,
948019c643SBruce M Simpson.Xr pmap_extract_and_hold 9 ,
958019c643SBruce M Simpson.Xr pmap_growkernel 9 ,
968019c643SBruce M Simpson.Xr pmap_init 9 ,
978019c643SBruce M Simpson.Xr pmap_is_modified 9 ,
98cdf9f377SBruce M Simpson.Xr pmap_is_prefaultable 9 ,
9974e4a8d2SMina Galić.Xr pmap_kextract 9 ,
1008019c643SBruce M Simpson.Xr pmap_map 9 ,
1018019c643SBruce M Simpson.Xr pmap_mincore 9 ,
1028019c643SBruce M Simpson.Xr pmap_object_init_pt 9 ,
1038019c643SBruce M Simpson.Xr pmap_page_exists_quick 9 ,
104d3f9f754SHiten Pandya.Xr pmap_page_init 9 ,
1058019c643SBruce M Simpson.Xr pmap_pinit 9 ,
1068019c643SBruce M Simpson.Xr pmap_pinit0 9 ,
1078019c643SBruce M Simpson.Xr pmap_protect 9 ,
1088019c643SBruce M Simpson.Xr pmap_qenter 9 ,
1098019c643SBruce M Simpson.Xr pmap_qremove 9 ,
110cbaa6a0eSJason A. Harmening.Xr pmap_quick_enter_page 9 ,
111cbaa6a0eSJason A. Harmening.Xr pmap_quick_remove_page 9 ,
1128019c643SBruce M Simpson.Xr pmap_release 9 ,
1138019c643SBruce M Simpson.Xr pmap_remove 9 ,
1148019c643SBruce M Simpson.Xr pmap_remove_all 9 ,
1158019c643SBruce M Simpson.Xr pmap_remove_pages 9 ,
1160734ae29SBruce M Simpson.Xr pmap_resident_count 9 ,
117cd81b88dSAlan Cox.Xr pmap_ts_referenced 9 ,
118ce5bed4bSAlan Cox.Xr pmap_unwire 9 ,
1190734ae29SBruce M Simpson.Xr pmap_wired_count 9 ,
1208019c643SBruce M Simpson.Xr pmap_zero_area 9 ,
1211c85060aSRuslan Ermilov.Xr pmap_zero_page 9 ,
1228019c643SBruce M Simpson.Xr vm_map 9
1238019c643SBruce M Simpson.Sh AUTHORS
1248019c643SBruce M SimpsonThis manual page was written by
1258a7314fcSBaptiste Daroussin.An Bruce M Simpson Aq Mt bms@spc.org .
126