docs/54691: [PATCH] provide man pages for the kernel MI pmap subsystem

Bruce M Simpson bms at spc.org
Mon Jul 21 08:40:25 UTC 2003


>Number:         54691
>Category:       docs
>Synopsis:       [PATCH] provide man pages for the kernel MI pmap subsystem
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 21 01:40:19 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Bruce M Simpson
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD saboteur.dek.spc.org 5.1-RELEASE FreeBSD 5.1-RELEASE #3: Mon Jun 23 06:55:01 BST 2003 root at saboteur.dek.spc.org:/usr/src/sys/i386/compile/SABOTEUR i386


	
>Description:
	This is a complete set of manual pages for the MI portion
	of the pmap subsystem.
>How-To-Repeat:
	
>Fix:

	

--- pmap_man.col.patch begins here ---
Generated by diffcoll on Mon 21 Jul 2003 05:12:21 BST

diff -uN src/share/man/man9/Makefile.orig src/share/man/man9/Makefile
--- /usr/src/share/man/man9/Makefile.orig	Mon Jul 21 05:10:42 2003
+++ /usr/src/share/man/man9/Makefile	Mon Jul 21 05:12:18 2003
@@ -58,7 +58,14 @@
 	module.9 mtx_pool.9 mutex.9 \
 	namei.9 \
 	panic.9 pbuf.9 pfil.9 pfind.9 pgfind.9 \
-	physio.9 printf.9 pseudofs.9 psignal.9 \
+	physio.9 \
+	pmap.9 pmap_activate.9 pmap_addr_hint.9 pmap_change_wiring.9 \
+	pmap_clear_modify.9 pmap_copy.9 pmap_enter.9 pmap_extract.9 \
+	pmap_growkernel.9 pmap_init.9 pmap_is_modified.9 pmap_map.9 \
+	pmap_mincore.9 pmap_object_init_pt.9 pmap_page_exists_quick.9 \
+	pmap_page_protect.9 pmap_pinit.9 pmap_prefault.9 pmap_qenter.9 \
+	pmap_release.9 pmap_remove.9 pmap_zero_page.9 \
+	printf.9 pseudofs.9 psignal.9 \
 	random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \
 	rtalloc.9 rtentry.9 runqueue.9  random_harvest.9 rijndael.9 \
 	rman.9 \
@@ -388,6 +388,18 @@
 MLINKS+=kobj.9 kobj_init.9
 MLINKS+=kobj.9 kobj_delete.9
 MLINKS+=kobj.9 DEFINE_CLASS.9
+
+MLINKS+=pmap_copy.9 pmap_copy_page.9
+MLINKS+=pmap_clear_modify.9 pmap_clear_reference.9
+MLINKS+=pmap_init.9 pmap_init2.9
+MLINKS+=pmap_is_modified.9 pmap_ts_modified.9
+MLINKS+=pmap_page_protect.9 pmap_protect.9
+MLINKS+=pmap_pinit.9 pmap_pinit0.9
+MLINKS+=pmap_pinit.9 pmap_pinit2.9
+MLINKS+=pmap_remove.9 pmap_remove_all.9
+MLINKS+=pmap_remove.9 pmap_remove_pages.9
+MLINKS+=pmap_zero_page.9 pmap_zero_area.9
+MLINKS+=pmap_zero_page.9 pmap_zero_idle.9
 
 MLINKS+= printf.9 uprintf.9
 MLINKS+= printf.9 tprintf.9

diff -uN src/share/man/man9/pmap.9.orig src/share/man/man9/pmap.9
--- /usr/src/share/man/man9/pmap.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,121 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap 9
+.Sh NAME
+.Nm pmap
+.Nd machine-dependent portion of virtual memory subsystem
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Sh DESCRIPTION
+The
+.Nm
+module is the machine-dependent portion of the
+.Fx
+VM.
+Each function documented herein must have its own implementation on
+each architecture which
+.Fx
+supports.
+.Pp
+.Nm
+is responsible for managing hardware-dependent objects such as page tables,
+address maps, TLBs, et cetera.
+.Pp
+Machine-dependent code must provide the header file
+.Em <machine/pmap.h> .
+This file contains the definition of the
+.Dv pmap
+structure:
+.Bd -literal -offset indent
+struct pmap {
+        /* Contents defined by pmap implementation. */
+};
+typedef struct pmap *pmap_t;
+.Ed
+.Pp
+This header file may also define other data structures that the
+machine-dependent
+.Nm
+implementation uses.
+.Pp
+The header file
+.Em <vm/pmap.h>
+defines a structure for tracking
+.Nm
+statistics (see below).
+This structure is defined as:
+.Bd -literal -offset indent
+struct pmap_statistics {
+        long        resident_count; /* number of mapped pages */
+        long        wired_count;    /* number of wired pages */
+};
+.Ed
+.Pp
+Each implementation is expected to maintain the statistics in this structure.
+.Sh SEE ALSO
+.Xr pmap 9 ,
+.Xr pmap_activate 9 ,
+.Xr pmap_addr_hint 9 ,
+.Xr pmap_change_wiring 9 ,
+.Xr pmap_clear_modify 9 ,
+.Xr pmap_clear_reference ,
+.Xr pmap_copy 9 ,
+.Xr pmap_copy_page 9 ,
+.Xr pmap_enter 9 ,
+.Xr pmap_extract 9 ,
+.Xr pmap_growkernel 9 ,
+.Xr pmap_init 9 ,
+.Xr pmap_init2 9 ,
+.Xr pmap_is_modified 9 ,
+.Xr pmap_map 9 ,
+.Xr pmap_mincore 9 ,
+.Xr pmap_object_init_pt 9 ,
+.Xr pmap_page_exists_quick 9 ,
+.Xr pmap_page_protect 9 ,
+.Xr pmap_pinit 9 ,
+.Xr pmap_pinit0 9 ,
+.Xr pmap_pinit2 9 ,
+.Xr pmap_prefault 9 ,
+.Xr pmap_protect 9 ,
+.Xr pmap_qenter 9 ,
+.Xr pmap_qremove 9 ,
+.Xr pmap_release 9 ,
+.Xr pmap_remove 9 ,
+.Xr pmap_remove_all 9 ,
+.Xr pmap_remove_pages 9 ,
+.Xr pmap_ts_modified 9 ,
+.Xr pmap_zero_area 9 ,
+.Xr pmap_zero_page 9 ,
+.Xr pmap_zero_idle 9 ,
+.Xr vm_map 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_activate.9.orig src/share/man/man9/pmap_activate.9
--- /usr/src/share/man/man9/pmap_activate.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_activate.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,50 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_activate 9
+.Sh NAME
+.Nm pmap_activate
+.Nd activate a physical map
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_activate "struct thread *td"
+.Sh DESCRIPTION
+The
+.Fn pmap_activate
+function activates the physical map for a user thread
+.Fa td .
+This function must called before the thread's address space can be
+accessed in any way.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_addr_hint.9.orig src/share/man/man9/pmap_addr_hint.9
--- /usr/src/share/man/man9/pmap_addr_hint.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_addr_hint.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,61 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_addr_hint 9
+.Sh NAME
+.Nm pmap_addr_hint
+.Nd get a hint for the best-fit mapping of a vm object
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft vm_offset_t
+.Fn pmap_addr_hint "vm_object_t obj" "vm_offset_t addr" "vm_size_t size"
+.Sh DESCRIPTION
+The
+.Fn pmap_addr_hint
+function returns a hint for the best address at which to map the object
+.Fa obj
+at address
+.Fa addr
+of
+.Fa size
+bytes.
+.Sh RETURN VALUES
+If the implementation can use the address unchanged, it will simply
+return
+.Fa addr .
+.Sh NOTES
+This function is typically called on behalf of
+.Xr mmap 2 .
+.Sh SEE ALSO
+.Xr mmap 2 ,
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_change_wiring.9.orig src/share/man/man9/pmap_change_wiring.9
--- /usr/src/share/man/man9/pmap_change_wiring.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_change_wiring.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,63 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_change_wiring 9
+.Sh NAME
+.Nm pmap_change_wiring
+.Nd change physical wiring for a map/virtual address pair
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_change_wiring "pmap_t pmap" "vm_offset_t va" "boolean_t wired"
+.Sh DESCRIPTION
+The
+.Fn pmap_change_wiring
+function changes the wiring attribute for the page at virtual address
+.Fa va
+in the physical map
+.Fa pmap .
+.Pp
+The mapping must already exist in the pmap.
+If
+.Fa wired
+is
+.Dv TRUE ,
+the map's wired page count will be incremented; if
+.Dv FALSE ,
+it will be decremented.
+.Pp
+It is typically called by the
+.Fn vm_fault_unwire
+function.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_clear_modify.9.orig src/share/man/man9/pmap_clear_modify.9
--- /usr/src/share/man/man9/pmap_clear_modify.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_clear_modify.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,58 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_clear_modify 9
+.Sh NAME
+.Nm pmap_clear_notify ,
+.Nm pmap_clear_reference
+.Nd set information about physical pages
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_clear_modify "vm_page_t m"
+.Ft void
+.Fn pmap_clear_reference "vm_page_t m"
+.Sh DESCRIPTION
+The
+.Fn pmap_clear_modify
+clears the 'modified' bit on the physical page
+.Fa m .
+.Pp
+The
+.Fn pmap_clear_reference
+clears the 'referenced' bit on the physical page
+.Fa m .
+.Sh SEE ALSO
+.Xr pmap 9 ,
+.Xr pmap_is_modified 9 ,
+.Xr pmap_ts_referenced 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_copy.9.orig src/share/man/man9/pmap_copy.9
--- /usr/src/share/man/man9/pmap_copy.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_copy.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_copy 9
+.Sh NAME
+.Nm pmap_copy ,
+.Nm pmap_copy_page
+.Nd copy physical memory pages
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fo pmap_copy
+.Fa "pmap_t dst_pmap"
+.Fa "pmap_t src_pmap"
+.Fa "vm_offset_t dst_addr"
+.Fa "vm_size_t len"
+.Fa "vm_offset_t src_addr"
+.Fc
+.Ft void
+.Fn pmap_copy_page "vm_page_t src" "vm_page_t dst"
+.Sh DESCRIPTION
+The
+.Fn pmap_copy
+function copies the range specified by
+.Fa src_addr
+and
+.Fa len
+from the source physical map
+.Fa src_pmap
+to the destination physical map
+.Fa dst_pmap
+at the address
+.Fa dst_addr .
+.Pp
+The
+.Fn pmap_copy_page
+function
+copies the physical page
+.Fa src
+to the physical page
+.Fa dst ,
+by mapping the page into kernel virtual address space, and using
+.Fn bcopy
+to copy the page.
+.Sh NOTES
+The
+.Fn pmap_copy
+routine is only advisory and need not do anything.
+Actually implementing it may seriously reduce system performance.
+.Pp
+The
+.Fn pmap_copy_page
+This routine only operates upon a single page.
+.Sh SEE ALSO
+.Xr bcopy 3 ,
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_enter.9.orig src/share/man/man9/pmap_enter.9
--- /usr/src/share/man/man9/pmap_enter.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_enter.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,70 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_enter 9
+.Sh NAME
+.Nm pmap_enter
+.Nd insert a virtual page into a physical map
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fo pmap_enter
+.Fa "pmap_t pmap"
+.Fa "vm_offset_t va"
+.Fa "vm_page_t p"
+.Fa "vm_prot_t prot"
+.Fa "boolean_t wired"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn pmap_enter
+function inserts the given physical page
+.Fa p ,
+into the physical map
+.Fa pmap ,
+at the virtual address
+.Fa va ,
+with the protection
+.Fa prot .
+If
+.Fa wired
+is
+.Dv TRUE ,
+then increment the wired count for the page as soon as the mapping
+is entered into
+.Fa pmap .
+.Sh NOTES
+This routine MAY NOT lazy-evaluate the entry; it is required by
+specification to make the requested entry at the time it is called.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_extract.9.orig src/share/man/man9/pmap_extract.9
--- /usr/src/share/man/man9/pmap_extract.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_extract.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,56 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_extract 9
+.Sh NAME
+.Nm pmap_extract
+.Nd map a virtual address to a physical address
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft vm_paddr_t
+.Fn pmap_extract "pmap_t pmap" "vm_offset_t va"
+.Sh DESCRIPTION
+The
+.Fn pmap_extract
+function maps a virtual address to a physical address.
+.Sh RETURN VALUES
+The
+.Fn pmap_extract
+function will return the physical page address associated with the
+virtual address
+.Fa va
+inside the physical map
+.Fa pmap .
+If the mapping does not exist, the result is undefined.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_growkernel.9.orig src/share/man/man9/pmap_growkernel.9
--- /usr/src/share/man/man9/pmap_growkernel.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_growkernel.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,50 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_growkernel 9
+.Sh NAME
+.Nm pmap_growkernel
+.Nd grow the kernel virtual address space
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_growkernel "vm_offset_t addr"
+.Sh DESCRIPTION
+The
+.Fn pmap_growkernel
+function grows the kernel virtual address space to the virtual address
+.Fa addr .
+.Pp
+It will allocate more page entries if required.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_init.9.orig src/share/man/man9/pmap_init.9
--- /usr/src/share/man/man9/pmap_init.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_init.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,79 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_init 9
+.Sh NAME
+.Nm pmap_init ,
+.Nm pmap_init2
+.Nd initialize the pmap subsystem
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_init "vm_paddr_t phys_start" "vm_paddr_t phys_end"
+.Ft void
+.Fn pmap_init2 "void"
+.Sh DESCRIPTION
+The
+.Fn pmap_init
+function initializes the pmap subsystem.
+It is called during system initialization by
+.Fn vm_init ,
+to initialize any structures that the
+.Nm
+system needs in order to map between physical and virtual memory.
+.Pp
+.Fn pmap_init
+has been enhanced to support discontiguous physical memory in a fairly
+consistent way.
+The module will manage the range of physical pages between
+.Fa phys_start
+and
+.Fa phys_end .
+.Pp
+The
+.Fn pmap_init2
+function initializes a zone for the pv entries.
+These are used to implement page sharing at the physical level.
+A high water mark is set so that the system can recover from
+excessive numbers of pv entries.
+.Sh NOTES
+If shared memory is heavily used within a system,
+the default pv entry count can be exhausted.
+The compile-time kernel tunable
+.Dv MAP_SHPGPERPROC
+can be used to increase this high water mark.
+This tunable was deprecated in
+.Fx 5.0 ,
+as the pv entries are now dynamically allocated.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_is_modified.9.orig src/share/man/man9/pmap_is_modified.9
--- /usr/src/share/man/man9/pmap_is_modified.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_is_modified.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,69 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_is_modified 9
+.Sh NAME
+.Nm pmap_is_modified ,
+.Nm pmap_ts_modified
+.Nd return information about physical pages
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft boolean_t
+.Fn pmap_is_modified "vm_page_t m"
+.Ft int
+.Fn pmap_ts_referenced "vm_page_t m"
+.Sh DESCRIPTION
+The
+.Fn pmap_is_modified
+and
+.Fn pmap_ts_referenced
+functions return information about physical pages.
+.Sh RETURN VALUES
+The
+.Fn pmap_is_modified
+function returns the status of the 'page modified' bit for the
+physical page
+.Fa m .
+.Pp
+The
+.Fn pmap_ts_referenced
+function returns a count of reference bits for a page
+.Fa m ,
+clearing those bits.
+It is not necessary for every reference bit to be cleared, but it is
+necessary that 0 only be returned when there are truly no reference
+bits set.
+.Sh SEE ALSO
+.Xr pmap 9 ,
+.Xr pmap_clear_modify 9 ,
+.Xr pmap_clear_reference 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_map.9.orig src/share/man/man9/pmap_map.9
--- /usr/src/share/man/man9/pmap_map.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_map.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,78 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_map 9
+.Sh NAME
+.Nm pmap_map
+.Nd map a physical memory range into kernel address space
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft vm_offset_t
+.Fo pmap_map
+.Fa "vm_offset_t *virt"
+.Fa "vm_paddr_t start"
+.Fa "vm_paddr_t end"
+.Fa "int prot"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn pmap_map
+function maps a range of physical addresses into kernel virtual address
+space, from
+.Fa start
+to
+.Fa end ,
+with protection bits
+.Fa prot .
+.Pp
+The value passed in
+.Fa *virt
+is treated as a hint for the virtual address of the beginning of the mapping.
+.Sh RETURN VALUES
+The
+.Fn pmap_map
+function returns the virtual address of the beginning of the mapping, if
+the mapping was successfully made;
+.Fa *virt
+will also be updated with the first usable address after the mapped region.
+.Pp
+Architectures which can support a direct mapped physical to virtual region
+can return the appropriate address within that region, leaving
+.Fa *virt
+unchanged.
+.Pp
+If the function is unsuccessful,
+.Dv NULL
+is returned.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_mincore.9.orig src/share/man/man9/pmap_mincore.9
--- /usr/src/share/man/man9/pmap_mincore.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_mincore.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,66 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_mincore 9
+.Sh NAME
+.Nm pmap_mincore
+.Nd determine if a virtual address is resident in physical memory
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft int
+.Fn pmap_mincore "pmap_t pmap" "vm_offset_t addr"
+.Sh DESCRIPTION
+The
+.Fn pmap_mincore
+function determines if the page at the virtual address
+.Fa addr
+in the physical map
+.Fa pmap
+is resident in physical memory.
+.Sh RETURN VALUES
+If the page is resident in physical memory,
+a mask of flags is returned,
+whose meaning is documented in
+.Xr mincore 2 ;
+otherwise,
+.Li 0
+is returned.
+.Pp
+The
+.Fa pmap
+must exist and
+.Fa addr
+must be mapped into it, otherwise the results are undefined.
+.Sh SEE ALSO
+.Xr mincore 2 ,
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_object_init_pt.9.orig src/share/man/man9/pmap_object_init_pt.9
--- /usr/src/share/man/man9/pmap_object_init_pt.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_object_init_pt.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,76 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_object_init_pt 9
+.Sh NAME
+.Nm pmap_object_init_pt
+.Nd initialize page tables for a vm_object
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fo pmap_object_init_pt
+.Fa "pmap_t pmap"
+.Fa "vm_offset_t addr"
+.Fa "vm_object_t object"
+.Fa "vm_pindex_t pindex"
+.Fa "vm_size_t size"
+.Fa "int limit"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn pmap_object_init_pt
+function preloads the page table entries into the specified physical map
+.Fa pmap ,
+for the given
+.Fa object
+at the virtual address
+.Fa addr ,
+for
+.Fa size
+bytes, beginning at the page index
+.Fa pindex
+within the object.
+The map bits
+.Fa limit
+are heeded when creating the mapping.
+.Sh NOTES
+This function is not strictly required by an architecture's
+.Xr pmap 9
+implementation, but it does provide performance benefits if implemented.
+.Pp
+It is intended to eliminate the blast of soft faults on process
+startup, and immediately following a call to
+.Xr mmap 2 .
+.Sh SEE ALSO
+.Xr pmap 9 ,
+.Xr vm_map 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_page_exists_quick.9.orig src/share/man/man9/pmap_page_exists_quick.9
--- /usr/src/share/man/man9/pmap_page_exists_quick.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_page_exists_quick.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,65 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_page_exists_quick 9
+.Sh NAME
+.Nm pmap_page_exists_quick
+.Nd determine if a page exists
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft boolean_t
+.Fn pmap_page_exists_quick "pmap_t pmap" "vm_page_t m"
+.Sh DESCRIPTION
+The
+.Fn pmap_page_exists_quick
+function is used to quickly deterimne if the page
+.Fa m
+exists in the physical map
+.Fa pmap .
+It is typically called from the VM paging code.
+.Sh RETURN VALUES
+The
+.Fn pmap_page_exists_quick
+returns
+.Dv TRUE
+if and only if the pv entry for the physical map
+.Fa pmap
+is one of the first 16 pvs linked to from the page
+.Fa m .
+.Sh NOTES
+The pv count used above may be changed upwards or downwards in future;
+it is only necessary that
+.Dv TRUE
+be returned for a small subset of pmaps for proper page aging.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_page_protect.9.orig src/share/man/man9/pmap_page_protect.9
--- /usr/src/share/man/man9/pmap_page_protect.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_page_protect.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,64 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_protect 9
+.Sh NAME
+.Nm pmap_page_protect ,
+.Nm pmap_protect
+.Nd set physical page protection
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_page_protect "vm_page_t m" "vm_prot_t prot"
+.Ft void
+.Fn pmap_protect "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva" "vm_prot_t pr
+.Sh DESCRIPTION
+The
+.Fn pmap_page_protect
+function lowers the physical page permissions to
+.Fa prot
+for all mappings of a given page
+.Fa m .
+.Pp
+The
+.Fn pmap_protect
+function sets the physical page permissions to
+.Fa prot
+for all physical pages in the physical map
+.Fa pmap
+in the virtual address range between
+.Fa sva
+and
+.Fa eva .
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_pinit.9.orig src/share/man/man9/pmap_pinit.9
--- /usr/src/share/man/man9/pmap_pinit.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_pinit.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,83 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_pinit 9
+.Sh NAME
+.Nm pmap_pinit ,
+.Nm pmap_pinit0 ,
+.Nm pmap_pinit2
+.Nd initialize pmap structures
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_pinit "pmap_t pmap"
+.Ft void
+.Fn pmap_pinit0 "pmap_t pm"
+.Ft void
+.Fn pmap_pinit2 "pmap_t pmap"
+.Sh DESCRIPTION
+The
+.Fn pmap_pinit
+function initializes the preallocated and zeroed structure
+.Fa pmap ,
+such as one in a vmspace structure.
+.Pp
+The
+.Fn pmap_pinit0
+function initializes the physical map
+.Fa pm ,
+associated with process 0, the first process created in the system.
+.Pp
+The
+.Fn pmap_pinit2
+function wires in kernel global address entries for the physical map
+.Fa pmap ,
+which must be associated with a user process.
+It is called during process creation.
+.Pp
+To avoid a race condition between
+.Fa pmap
+intialization and
+.Fn pmap_growkernel ,
+.Fn pmap_pinit2
+should be called after the vmspace
+is attached to the process but before this
+.Fa pmap
+is activated.
+.Sh NOTES
+The
+.Fn pmap_pinit2
+function has been deprecated, and should be implemented as a stub
+until further notice.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_prefault.9.orig src/share/man/man9/pmap_prefault.9
--- /usr/src/share/man/man9/pmap_prefault.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_prefault.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,67 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_prefault 9
+.Sh NAME
+.Nm pmap_prefault
+.Nd cluster page faults into a process address space
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_prefault "pmap_t pmap" "vm_offset_t addra" "vm_map_entry_t entry"
+.Sh DESCRIPTION
+The
+.Fn pmap_prefault
+function provides a means of clustering pagefaults into a process's
+address space.
+It operates upon the physical map
+.Fa pmap .
+The
+.Fa entry
+argument specifies the entry to be prefaulted; the
+.Fa addra
+argument specifies the beginning of the mapping in the process's virtual
+address space.
+.Pp
+It is typically called by
+.Fn vm_fault
+after the first page fault.
+It benefits the
+.Fn exec
+system call by eliminating repetitive calls to
+.Fn vm_fault ,
+which would otherwise be made to bring the process's executable pages
+into physical memory.
+.Sh SEE ALSO
+.Xr execve 2 ,
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_qenter.9.orig src/share/man/man9/pmap_qenter.9
--- /usr/src/share/man/man9/pmap_qenter.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_qenter.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,77 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_qenter 9
+.Sh NAME
+.Nm pmap_qenter ,
+.Nm pmap_qremove
+.Nd manage temporary kernel space mappings
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_qenter "vm_offset_t sva" "vm_page_t *m" "int count"
+.Ft void
+.Fn pmap_qremove "vm_offset_t sva" "int count"
+.Sh DESCRIPTION
+The
+.Fn pmap_qenter
+function accepts a linear array of
+.Fa count
+pointers to wired pages
+.Fa *m ,
+and enters each of these pages into the kernel virtual address space,
+beginning at the address
+.Fa sva .
+.Pp
+The
+.Fn pmap_qremove
+function tears out a mapping from the kernel virtual address space,
+beginning at
+.Fa sva
+and for
+.Fa count
+pages.
+.Sh NOTES
+The
+.Fn pmap_qenter
+function is intended for temporary mappings that do not require page
+modification or reference counting.
+Old mappings are simply overwritten.
+The pages
+.Em must
+be wired into physical memory.
+.Pp
+The corresponding
+.Fn pmap_qremove
+function is intended to remove such temporary mappings.
+.Sh SEE ALSO
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_release.9.orig src/share/man/man9/pmap_release.9
--- /usr/src/share/man/man9/pmap_release.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_release.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,56 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_release 9
+.Sh NAME
+.Nm pmap_release
+.Nd release resources held by a physical map
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_release "pmap_t pmap"
+.Sh DESCRIPTION
+The
+.Fn pmap_release
+function releases any resources held by the physical map
+.Fa pmap .
+Called when a pmap initialized by the corresponding function,
+.Fn pmap_pinit
+is being released.
+.Sh NOTES
+This function should only be called if
+.Fa pmap
+no longer contains any valid mappings.
+.Sh SEE ALSO
+.Xr pmap 9 ,
+.Xr pmap_pinit 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_remove.9.orig src/share/man/man9/pmap_remove.9
--- /usr/src/share/man/man9/pmap_remove.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_remove.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,87 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_remove 9
+.Sh NAME
+.Nm pmap_remove ,
+.Nm pmap_remove_all ,
+.Nm pmap_remove_pages
+.Nd remove pages from a physical map
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_remove "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva"
+.Ft void
+.Fn pmap_remove_all "vm_page_t m"
+.Ft void
+.Fn pmap_remove_pages "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva"
+.Sh DESCRIPTION
+The
+.Fn pmap_remove
+function removes the range of addresses between
+.Fa sva
+and
+.Fa eva
+from the physical map
+.Fa pmap .
+If
+.Fa eva
+is less than
+.Fa sva ,
+then the result is undefined.
+It is assumed that both
+.Fa sva
+and
+.Fa eva
+are page-aligned addresses.
+.Pp
+The
+.Fn pmap_remove_all
+removes the physical page
+.Fa m
+from all physical maps in which it resides, and reflects back the modify
+bits to the appropriate pager.
+.Pp
+The
+.Fn pmap_remove_pages
+function removes all pages from the physical map
+.Fa pmap ,
+within the range of physical addresses bounded by
+.Fa sva
+and
+.Fa eva .
+This function is called when a process exits to run down its address space
+more quickly than would be the case for calling
+.Fn pmap_remove .
+.Sh SEE ALSO
+.Fn pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .

diff -uN src/share/man/man9/pmap_zero_page.9.orig src/share/man/man9/pmap_zero_page.9
--- /usr/src/share/man/man9/pmap_zero_page.9.orig	Mon Jul 21 04:59:06 2003
+++ /usr/src/share/man/man9/pmap_zero_page.9	Mon Jul 21 05:11:20 2003
@@ -0,0 +1,71 @@
+.\"
+.\" Copyright (c) 2003 Bruce M Simpson <bms at spc.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2003
+.Dt pmap_zero_page 9
+.Sh NAME
+.Nm pmap_zero_page ,
+.Nm pmap_zero_area ,
+.Nm pmap_zero_idle
+.Nd zero-fill a page using machine-dependent optimizations
+.Sh SYNOPSIS
+.In sys/param.h
+.In vm/vm.h
+.In vm/pmap.h
+.Ft void
+.Fn pmap_zero_page "vm_page_t m"
+.Ft void
+.Fn pmap_zero_page_area "vm_page_t m" "int off" "int size"
+.Ft void
+.Fn pmap_zero_page_idle "vm_page_t m"
+.Sh DESCRIPTION
+The
+.Fn pmap_zero_page
+function zero-fills an entire page using machine-dependent optimizations.
+The
+.Fn pmap_zero_page_area
+function is used to zero-fill an area of a page.
+The range specified must not cross a page boundary; it must be contained
+entirely within a single page.
+.Pp
+The
+.Fn pmap_zero_page_idle
+interface is used by the 
+.Em vm_pagezero
+process.
+The system-wide
+.Fa Giant
+lock should not be required to be held in order to call this interface.
+.Sh NOTES
+This function is required to be implemented for each architecture supported by
+.Fx .
+.Sh SEE ALSO
+.Xr bzero 3 ,
+.Xr pmap 9
+.Sh AUTHORS
+This man page was written by
+.An Bruce M Simpson Aq bms at spc.org .
--- pmap_man.col.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list