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.\" 268019c643SBruce M Simpson.\" $FreeBSD$ 278019c643SBruce M Simpson.\" 2853cc33f6SAlan Cox.Dd July 17, 2014 298019c643SBruce M Simpson.Dt PMAP 9 30b4ca3754SRuslan Ermilov.Os 318019c643SBruce M Simpson.Sh NAME 328019c643SBruce M Simpson.Nm pmap 338019c643SBruce M Simpson.Nd machine-dependent portion of virtual memory subsystem 348019c643SBruce M Simpson.Sh SYNOPSIS 358019c643SBruce M Simpson.In sys/param.h 368019c643SBruce M Simpson.In vm/vm.h 378019c643SBruce M Simpson.In vm/pmap.h 388019c643SBruce M Simpson.Sh DESCRIPTION 398019c643SBruce M SimpsonThe 408019c643SBruce M Simpson.Nm 418019c643SBruce M Simpsonmodule is the machine-dependent portion of the 428019c643SBruce M Simpson.Fx 438019c643SBruce M SimpsonVM (Virtual Memory) sub-system. 448019c643SBruce M SimpsonEach function documented herein must have its own 458019c643SBruce M Simpsonarchitecture-dependent implementation. 468019c643SBruce M Simpson.Pp 478019c643SBruce M SimpsonThe 488019c643SBruce M Simpson.Nm 498019c643SBruce M Simpsonmodule 508019c643SBruce M Simpsonis responsible for managing hardware-dependent objects such as page tables, 518019c643SBruce M Simpsonaddress maps, TLBs, etc. 528019c643SBruce M Simpson.Pp 538019c643SBruce M SimpsonMachine-dependent code must provide the header file 541772ac3fSRuslan Ermilov.In machine/pmap.h . 558019c643SBruce M SimpsonThis file contains the definition of the 561772ac3fSRuslan Ermilov.Vt pmap 578019c643SBruce M Simpsonstructure: 588019c643SBruce M Simpson.Bd -literal -offset indent 598019c643SBruce M Simpsonstruct pmap { 608019c643SBruce M Simpson /* Contents defined by pmap implementation. */ 618019c643SBruce M Simpson}; 628019c643SBruce M Simpsontypedef struct pmap *pmap_t; 638019c643SBruce M Simpson.Ed 648019c643SBruce M Simpson.Pp 658019c643SBruce M SimpsonThis header file may also define other data structures used by the 668019c643SBruce M Simpson.Nm 678019c643SBruce M Simpsonimplementation. 688019c643SBruce M Simpson.Pp 698019c643SBruce M SimpsonThe header file 701772ac3fSRuslan Ermilov.In vm/pmap.h 718019c643SBruce M Simpsondefines a structure for tracking 728019c643SBruce M Simpson.Nm 738019c643SBruce M Simpsonstatistics (see below). 748019c643SBruce M SimpsonThis structure is defined as: 758019c643SBruce M Simpson.Bd -literal -offset indent 768019c643SBruce M Simpsonstruct pmap_statistics { 778019c643SBruce M Simpson long resident_count; /* number of mapped pages */ 788019c643SBruce M Simpson long wired_count; /* number of wired pages */ 798019c643SBruce M Simpson}; 808019c643SBruce M Simpson.Ed 818019c643SBruce M Simpson.Pp 821aba005aSBruce M SimpsonThe implementation's 831772ac3fSRuslan Ermilov.Vt "struct pmap" 841aba005aSBruce M Simpsonmust contain an instance of this structure having the name 851aba005aSBruce M Simpson.Va pm_stats , 861aba005aSBruce M Simpsonand it must be updated by the implementation after each relevant 871772ac3fSRuslan Ermilov.Nm 881aba005aSBruce M Simpsonoperation. 898019c643SBruce M Simpson.Sh SEE ALSO 908019c643SBruce M Simpson.Xr pmap 9 , 918019c643SBruce M Simpson.Xr pmap_activate 9 , 928019c643SBruce M Simpson.Xr pmap_change_wiring 9 , 938019c643SBruce M Simpson.Xr pmap_clear_modify 9 , 948019c643SBruce M Simpson.Xr pmap_copy 9 , 958019c643SBruce M Simpson.Xr pmap_copy_page 9 , 968019c643SBruce M Simpson.Xr pmap_enter 9 , 978019c643SBruce M Simpson.Xr pmap_extract 9 , 988019c643SBruce M Simpson.Xr pmap_extract_and_hold 9 , 998019c643SBruce M Simpson.Xr pmap_growkernel 9 , 1008019c643SBruce M Simpson.Xr pmap_init 9 , 1018019c643SBruce M Simpson.Xr pmap_init2 9 , 1028019c643SBruce M Simpson.Xr pmap_is_modified 9 , 103cdf9f377SBruce M Simpson.Xr pmap_is_prefaultable 9 , 1048019c643SBruce M Simpson.Xr pmap_map 9 , 1058019c643SBruce M Simpson.Xr pmap_mincore 9 , 1068019c643SBruce M Simpson.Xr pmap_object_init_pt 9 , 1078019c643SBruce M Simpson.Xr pmap_page_exists_quick 9 , 108d3f9f754SHiten Pandya.Xr pmap_page_init 9 , 1098019c643SBruce M Simpson.Xr pmap_page_protect 9 , 1108019c643SBruce M Simpson.Xr pmap_pinit 9 , 1118019c643SBruce M Simpson.Xr pmap_pinit0 9 , 1128019c643SBruce M Simpson.Xr pmap_pinit2 9 , 1138019c643SBruce M Simpson.Xr pmap_protect 9 , 1148019c643SBruce M Simpson.Xr pmap_qenter 9 , 1158019c643SBruce M Simpson.Xr pmap_qremove 9 , 1168019c643SBruce M Simpson.Xr pmap_release 9 , 1178019c643SBruce M Simpson.Xr pmap_remove 9 , 1188019c643SBruce M Simpson.Xr pmap_remove_all 9 , 1198019c643SBruce M Simpson.Xr pmap_remove_pages 9 , 1200734ae29SBruce M Simpson.Xr pmap_resident_count 9 , 121cd81b88dSAlan Cox.Xr pmap_ts_referenced 9 , 122*ce5bed4bSAlan Cox.Xr pmap_unwire 9 , 1230734ae29SBruce M Simpson.Xr pmap_wired_count 9 , 1248019c643SBruce M Simpson.Xr pmap_zero_area 9 , 1258019c643SBruce M Simpson.Xr pmap_zero_idle 9 , 1261c85060aSRuslan Ermilov.Xr pmap_zero_page 9 , 1278019c643SBruce M Simpson.Xr vm_map 9 1288019c643SBruce M Simpson.Sh AUTHORS 1298019c643SBruce M SimpsonThis manual page was written by 1308a7314fcSBaptiste Daroussin.An Bruce M Simpson Aq Mt bms@spc.org . 131