Add manual page documentation for the machine-independent PMAP subsystem.
Include documentation of alc's new pmap_extract_and_hold() function. Reviewed by: hmp Approved by: jake (mentor)
This commit is contained in:
parent
17dcd0265b
commit
8019c643f1
@ -59,6 +59,12 @@ MAN= BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \
|
||||
namei.9 \
|
||||
panic.9 pbuf.9 pci.9 pfil.9 pfind.9 pgfind.9 \
|
||||
physio.9 printf.9 pseudofs.9 psignal.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 \
|
||||
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 \
|
||||
@ -203,6 +209,16 @@ MLINKS+=pci.9 pci_get_powerstate.9 pci.9 pci_set_powerstate.9
|
||||
MLINKS+=pci.9 pci_find_bsf.9 pci.9 pci_find_device.9
|
||||
MLINKS+=pfil.9 pfil_hook_get.9 pfil.9 pfil_add_hook.9 pfil.9 pfil_remove_hook.9
|
||||
MLINKS+=pfind.9 zpfind.9
|
||||
MLINKS+=pmap_clear_modify.9 pmap_clear_reference.9
|
||||
MLINKS+=pmap_copy.9 pmap_copy_page.9
|
||||
MLINKS+=pmap_extract.9 pmap_extract_and_hold.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 pmap_pinit2.9
|
||||
MLINKS+=pmap_qenter.9 pmap_qremove.9
|
||||
MLINKS+=pmap_remove.9 pmap_remove_all.9 pmap_remove_pages.9
|
||||
MLINKS+=pmap_zero_page.9 pmap_zero_area.9 pmap_zero_idle.9
|
||||
MLINKS+=psignal.9 gsignal.9 psignal.9 pgsignal.9
|
||||
MLINKS+=random.9 srandom.9 random.9 arc4random.9 random.9 read_random.9
|
||||
MLINKS+=random.9 arc4rand.9
|
||||
|
121
share/man/man9/pmap.9
Normal file
121
share/man/man9/pmap.9
Normal file
@ -0,0 +1,121 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 (Virtual Memory) sub-system.
|
||||
Each function documented herein must have its own
|
||||
architecture-dependent implementation.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
module
|
||||
is responsible for managing hardware-dependent objects such as page tables,
|
||||
address maps, TLBs, etc.
|
||||
.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 used by the
|
||||
.Nm
|
||||
implementation.
|
||||
.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_extract_and_hold 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
50
share/man/man9/pmap_activate.9
Normal file
50
share/man/man9/pmap_activate.9
Normal file
@ -0,0 +1,50 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 be called before the thread's address space may be
|
||||
accessed.
|
||||
.Sh SEE ALSO
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
61
share/man/man9/pmap_addr_hint.9
Normal file
61
share/man/man9/pmap_addr_hint.9
Normal file
@ -0,0 +1,61 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 IMPLEMENTATION NOTES
|
||||
This function is typically called on behalf of
|
||||
.Fn mmap .
|
||||
.Sh RETURN VALUES
|
||||
If the implementation can use the address unchanged, it will simply
|
||||
return
|
||||
.Fa addr .
|
||||
.Sh SEE ALSO
|
||||
.Xr mmap 2 ,
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
66
share/man/man9/pmap_change_wiring.9
Normal file
66
share/man/man9/pmap_change_wiring.9
Normal file
@ -0,0 +1,66 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 or 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 .
|
||||
A wired page gets its name from being
|
||||
.Sq wired
|
||||
into the system page tables so that it will not be paged out.
|
||||
.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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
62
share/man/man9/pmap_clear_modify.9
Normal file
62
share/man/man9/pmap_clear_modify.9
Normal file
@ -0,0 +1,62 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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_modify ,
|
||||
.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
|
||||
function clears the
|
||||
.Sq modified
|
||||
bit on the physical page
|
||||
.Fa m .
|
||||
.Pp
|
||||
The
|
||||
.Fn pmap_clear_reference
|
||||
function clears the
|
||||
.Sq 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
81
share/man/man9/pmap_copy.9
Normal file
81
share/man/man9/pmap_copy.9
Normal file
@ -0,0 +1,81 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Fn pmap_copy "pmap_t dst_pmap" "pmap_t src_pmap" "vm_offset_t dst_addr" \
|
||||
"vm_size_t len" "vm_offset_t src_addr"
|
||||
.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 (KVA), and using
|
||||
.Fn bcopy
|
||||
to copy the page.
|
||||
.Sh IMPLEMENTATION 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
|
||||
routine only operates upon a single page.
|
||||
.Sh SEE ALSO
|
||||
.Xr bcopy 3 ,
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
65
share/man/man9/pmap_enter.9
Normal file
65
share/man/man9/pmap_enter.9
Normal file
@ -0,0 +1,65 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Fn pmap_enter "pmap_t pmap" "vm_offset_t va" "vm_page_t p" "vm_prot_t prot" \
|
||||
"boolean_t wired"
|
||||
.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 inserted into
|
||||
.Fa pmap .
|
||||
.Sh IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
95
share/man/man9/pmap_extract.9
Normal file
95
share/man/man9/pmap_extract.9
Normal file
@ -0,0 +1,95 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 ,
|
||||
.Nm pmap_extract_and_hold
|
||||
.Nd map a virtual address to a physical page
|
||||
.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"
|
||||
.Ft vm_paddr_t
|
||||
.Fn pmap_extract_and_hold "pmap_t pmap" "vm_offset_t va" "vm_prot_t prot"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn pmap_extract
|
||||
function maps a virtual address to a physical page.
|
||||
In certain situations, callers may use
|
||||
.Fn pmap_extract_and_hold
|
||||
instead, to ensure that the returned page is held.
|
||||
.Pp
|
||||
The
|
||||
.Fn pmap_extract_and_hold
|
||||
function maps a virtual address to a physical page, and atomically holds
|
||||
the returned page for use by the caller, only if the mapping permits
|
||||
the given page protection.
|
||||
.Sh IMPLEMENTATION NOTES
|
||||
Currently, the page protection requested by the caller is not verified.
|
||||
.Pp
|
||||
In the
|
||||
.Fn pmap_extract_and_hold
|
||||
function, the
|
||||
.Dv Giant
|
||||
lock is held for the duration of the call to ensure that only a single
|
||||
caller is present.
|
||||
.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, or if the
|
||||
.Fa pmap
|
||||
parameter is NULL, then NULL will be returned.
|
||||
.Pp
|
||||
The
|
||||
.Fn pmap_extract_and_hold
|
||||
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 a no-op, and NULL will
|
||||
be returned.
|
||||
.Sh SEE ALSO
|
||||
.Xr mutex 9 ,
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
.Fn pmap_extract_and_hold
|
||||
function was implemented by
|
||||
.An Alan L. Cox Aq alc@imimic.com .
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
50
share/man/man9/pmap_growkernel.9
Normal file
50
share/man/man9/pmap_growkernel.9
Normal file
@ -0,0 +1,50 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 (KVA) 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
72
share/man/man9/pmap_init.9
Normal file
72
share/man/man9/pmap_init.9
Normal file
@ -0,0 +1,72 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Xr pmap 9
|
||||
sub-system.
|
||||
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
|
||||
The
|
||||
.Fn pmap_init
|
||||
supports 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 SEE ALSO
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
70
share/man/man9/pmap_is_modified.9
Normal file
70
share/man/man9/pmap_is_modified.9
Normal file
@ -0,0 +1,70 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Sq "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 no remaining reference
|
||||
bits set on the page.
|
||||
.Sh SEE ALSO
|
||||
.Xr pmap 9 ,
|
||||
.Xr pmap_clear_modify 9 ,
|
||||
.Xr pmap_clear_reference 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
78
share/man/man9/pmap_map.9
Normal file
78
share/man/man9/pmap_map.9
Normal file
@ -0,0 +1,78 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 virtual address (KVA) space
|
||||
.Sh SYNOPSIS
|
||||
.In sys/param.h
|
||||
.In vm/vm.h
|
||||
.In vm/pmap.h
|
||||
.Ft vm_offset_t
|
||||
.Fn pmap_map "vm_offset_t *virt" "vm_paddr_t start" "vm_paddr_t end" \
|
||||
"int prot"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn pmap_map
|
||||
function maps a range of physical addresses into kernel virtual address (KVA)
|
||||
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 IMPLEMENTATION NOTES
|
||||
The
|
||||
.Fa prot
|
||||
argument is currently ignored by machine-dependent implementations.
|
||||
.Pp
|
||||
Architectures which can support a direct mapped physical to virtual
|
||||
region can return the appropriate address within that region, leaving
|
||||
.Fa *virt
|
||||
unchanged.
|
||||
.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
|
||||
If the function is unsuccessful,
|
||||
.Dv NULL
|
||||
is returned.
|
||||
.Sh SEE ALSO
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
73
share/man/man9/pmap_mincore.9
Normal file
73
share/man/man9/pmap_mincore.9
Normal file
@ -0,0 +1,73 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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.
|
||||
It is the machine-dependent interface used by
|
||||
.Xr mincore 2
|
||||
system call.
|
||||
.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,
|
||||
.Ql 0
|
||||
is returned.
|
||||
.Pp
|
||||
The
|
||||
.Fa pmap
|
||||
must exist and
|
||||
.Fa addr
|
||||
must be mapped into the
|
||||
.Fa pmap .
|
||||
If any error occurs, the machine-dependent implementation should
|
||||
return
|
||||
.Ql 0 .
|
||||
.Sh SEE ALSO
|
||||
.Xr mincore 2 ,
|
||||
.Xr pmap 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
70
share/man/man9/pmap_object_init_pt.9
Normal file
70
share/man/man9/pmap_object_init_pt.9
Normal file
@ -0,0 +1,70 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Fn pmap_object_init_pt "pmap_t pmap" "vm_offset_t addr" "vm_object_t object" \
|
||||
"vm_pindex_t pindex" "vm_size_t size" "int limit"
|
||||
.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 IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
65
share/man/man9/pmap_page_exists_quick.9
Normal file
65
share/man/man9/pmap_page_exists_quick.9
Normal file
@ -0,0 +1,65 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 in a physical map
|
||||
.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 determine 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
|
||||
only if the PV entry for the physical map
|
||||
.Fa pmap
|
||||
is one of the first 16 PVs linked from the page
|
||||
.Fa m .
|
||||
.Sh IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
65
share/man/man9/pmap_page_protect.9
Normal file
65
share/man/man9/pmap_page_protect.9
Normal file
@ -0,0 +1,65 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
86
share/man/man9/pmap_pinit.9
Normal file
86
share/man/man9/pmap_pinit.9
Normal file
@ -0,0 +1,86 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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
|
||||
.Vt 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 IMPLEMENTATION 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 ,
|
||||
.Xr pmap_growkernel 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
67
share/man/man9/pmap_prefault.9
Normal file
67
share/man/man9/pmap_prefault.9
Normal file
@ -0,0 +1,67 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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's 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
78
share/man/man9/pmap_qenter.9
Normal file
78
share/man/man9/pmap_qenter.9
Normal file
@ -0,0 +1,78 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 (KVA) 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 IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
57
share/man/man9/pmap_release.9
Normal file
57
share/man/man9/pmap_release.9
Normal file
@ -0,0 +1,57 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 .
|
||||
This function is
|
||||
called when a pmap initialized by the corresponding function,
|
||||
.Fn pmap_pinit
|
||||
is being released.
|
||||
.Sh IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
87
share/man/man9/pmap_remove.9
Normal file
87
share/man/man9/pmap_remove.9
Normal file
@ -0,0 +1,87 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
71
share/man/man9/pmap_zero_page.9
Normal file
71
share/man/man9/pmap_zero_page.9
Normal file
@ -0,0 +1,71 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Bruce M Simpson <bms@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 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 IMPLEMENTATION 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 manual page was written by
|
||||
.An Bruce M Simpson Aq bms@spc.org .
|
Loading…
Reference in New Issue
Block a user