View | Details | Raw Unified | Return to bug 54691 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/src/share/man/man9/Makefile (-1 / +20 lines)
Lines 58-64 Link Here
58
	module.9 mtx_pool.9 mutex.9 \
58
	module.9 mtx_pool.9 mutex.9 \
59
	namei.9 \
59
	namei.9 \
60
	panic.9 pbuf.9 pfil.9 pfind.9 pgfind.9 \
60
	panic.9 pbuf.9 pfil.9 pfind.9 pgfind.9 \
61
	physio.9 printf.9 pseudofs.9 psignal.9 \
61
	physio.9 \
62
	pmap.9 pmap_activate.9 pmap_addr_hint.9 pmap_change_wiring.9 \
63
	pmap_clear_modify.9 pmap_copy.9 pmap_enter.9 pmap_extract.9 \
64
	pmap_growkernel.9 pmap_init.9 pmap_is_modified.9 pmap_map.9 \
65
	pmap_mincore.9 pmap_object_init_pt.9 pmap_page_exists_quick.9 \
66
	pmap_page_protect.9 pmap_pinit.9 pmap_prefault.9 pmap_qenter.9 \
67
	pmap_release.9 pmap_remove.9 pmap_zero_page.9 \
68
	printf.9 pseudofs.9 psignal.9 \
62
	random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \
69
	random.9 resettodr.9 resource_int_value.9 resource_query_string.9 \
63
	rtalloc.9 rtentry.9 runqueue.9  random_harvest.9 rijndael.9 \
70
	rtalloc.9 rtentry.9 runqueue.9  random_harvest.9 rijndael.9 \
64
	rman.9 \
71
	rman.9 \
Lines 388-393 Link Here
388
MLINKS+=kobj.9 kobj_init.9
388
MLINKS+=kobj.9 kobj_init.9
389
MLINKS+=kobj.9 kobj_delete.9
389
MLINKS+=kobj.9 kobj_delete.9
390
MLINKS+=kobj.9 DEFINE_CLASS.9
390
MLINKS+=kobj.9 DEFINE_CLASS.9
391
392
MLINKS+=pmap_copy.9 pmap_copy_page.9
393
MLINKS+=pmap_clear_modify.9 pmap_clear_reference.9
394
MLINKS+=pmap_init.9 pmap_init2.9
395
MLINKS+=pmap_is_modified.9 pmap_ts_modified.9
396
MLINKS+=pmap_page_protect.9 pmap_protect.9
397
MLINKS+=pmap_pinit.9 pmap_pinit0.9
398
MLINKS+=pmap_pinit.9 pmap_pinit2.9
399
MLINKS+=pmap_remove.9 pmap_remove_all.9
400
MLINKS+=pmap_remove.9 pmap_remove_pages.9
401
MLINKS+=pmap_zero_page.9 pmap_zero_area.9
402
MLINKS+=pmap_zero_page.9 pmap_zero_idle.9
391
403
392
MLINKS+= printf.9 uprintf.9
404
MLINKS+= printf.9 uprintf.9
393
MLINKS+= printf.9 tprintf.9
405
MLINKS+= printf.9 tprintf.9
(-)/usr/src/share/man/man9/pmap.9 (+121 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap 9
30
.Sh NAME
31
.Nm pmap
32
.Nd machine-dependent portion of virtual memory subsystem
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Sh DESCRIPTION
38
The
39
.Nm
40
module is the machine-dependent portion of the
41
.Fx
42
VM.
43
Each function documented herein must have its own implementation on
44
each architecture which
45
.Fx
46
supports.
47
.Pp
48
.Nm
49
is responsible for managing hardware-dependent objects such as page tables,
50
address maps, TLBs, et cetera.
51
.Pp
52
Machine-dependent code must provide the header file
53
.Em <machine/pmap.h> .
54
This file contains the definition of the
55
.Dv pmap
56
structure:
57
.Bd -literal -offset indent
58
struct pmap {
59
        /* Contents defined by pmap implementation. */
60
};
61
typedef struct pmap *pmap_t;
62
.Ed
63
.Pp
64
This header file may also define other data structures that the
65
machine-dependent
66
.Nm
67
implementation uses.
68
.Pp
69
The header file
70
.Em <vm/pmap.h>
71
defines a structure for tracking
72
.Nm
73
statistics (see below).
74
This structure is defined as:
75
.Bd -literal -offset indent
76
struct pmap_statistics {
77
        long        resident_count; /* number of mapped pages */
78
        long        wired_count;    /* number of wired pages */
79
};
80
.Ed
81
.Pp
82
Each implementation is expected to maintain the statistics in this structure.
83
.Sh SEE ALSO
84
.Xr pmap 9 ,
85
.Xr pmap_activate 9 ,
86
.Xr pmap_addr_hint 9 ,
87
.Xr pmap_change_wiring 9 ,
88
.Xr pmap_clear_modify 9 ,
89
.Xr pmap_clear_reference ,
90
.Xr pmap_copy 9 ,
91
.Xr pmap_copy_page 9 ,
92
.Xr pmap_enter 9 ,
93
.Xr pmap_extract 9 ,
94
.Xr pmap_growkernel 9 ,
95
.Xr pmap_init 9 ,
96
.Xr pmap_init2 9 ,
97
.Xr pmap_is_modified 9 ,
98
.Xr pmap_map 9 ,
99
.Xr pmap_mincore 9 ,
100
.Xr pmap_object_init_pt 9 ,
101
.Xr pmap_page_exists_quick 9 ,
102
.Xr pmap_page_protect 9 ,
103
.Xr pmap_pinit 9 ,
104
.Xr pmap_pinit0 9 ,
105
.Xr pmap_pinit2 9 ,
106
.Xr pmap_prefault 9 ,
107
.Xr pmap_protect 9 ,
108
.Xr pmap_qenter 9 ,
109
.Xr pmap_qremove 9 ,
110
.Xr pmap_release 9 ,
111
.Xr pmap_remove 9 ,
112
.Xr pmap_remove_all 9 ,
113
.Xr pmap_remove_pages 9 ,
114
.Xr pmap_ts_modified 9 ,
115
.Xr pmap_zero_area 9 ,
116
.Xr pmap_zero_page 9 ,
117
.Xr pmap_zero_idle 9 ,
118
.Xr vm_map 9
119
.Sh AUTHORS
120
This man page was written by
121
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_activate.9 (+50 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_activate 9
30
.Sh NAME
31
.Nm pmap_activate
32
.Nd activate a physical map
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_activate "struct thread *td"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_activate
42
function activates the physical map for a user thread
43
.Fa td .
44
This function must called before the thread's address space can be
45
accessed in any way.
46
.Sh SEE ALSO
47
.Xr pmap 9
48
.Sh AUTHORS
49
This man page was written by
50
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_addr_hint.9 (+61 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_addr_hint 9
30
.Sh NAME
31
.Nm pmap_addr_hint
32
.Nd get a hint for the best-fit mapping of a vm object
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft vm_offset_t
38
.Fn pmap_addr_hint "vm_object_t obj" "vm_offset_t addr" "vm_size_t size"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_addr_hint
42
function returns a hint for the best address at which to map the object
43
.Fa obj
44
at address
45
.Fa addr
46
of
47
.Fa size
48
bytes.
49
.Sh RETURN VALUES
50
If the implementation can use the address unchanged, it will simply
51
return
52
.Fa addr .
53
.Sh NOTES
54
This function is typically called on behalf of
55
.Xr mmap 2 .
56
.Sh SEE ALSO
57
.Xr mmap 2 ,
58
.Xr pmap 9
59
.Sh AUTHORS
60
This man page was written by
61
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_change_wiring.9 (+63 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_change_wiring 9
30
.Sh NAME
31
.Nm pmap_change_wiring
32
.Nd change physical wiring for a map/virtual address pair
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_change_wiring "pmap_t pmap" "vm_offset_t va" "boolean_t wired"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_change_wiring
42
function changes the wiring attribute for the page at virtual address
43
.Fa va
44
in the physical map
45
.Fa pmap .
46
.Pp
47
The mapping must already exist in the pmap.
48
If
49
.Fa wired
50
is
51
.Dv TRUE ,
52
the map's wired page count will be incremented; if
53
.Dv FALSE ,
54
it will be decremented.
55
.Pp
56
It is typically called by the
57
.Fn vm_fault_unwire
58
function.
59
.Sh SEE ALSO
60
.Xr pmap 9
61
.Sh AUTHORS
62
This man page was written by
63
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_clear_modify.9 (+58 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_clear_modify 9
30
.Sh NAME
31
.Nm pmap_clear_notify ,
32
.Nm pmap_clear_reference
33
.Nd set information about physical pages
34
.Sh SYNOPSIS
35
.In sys/param.h
36
.In vm/vm.h
37
.In vm/pmap.h
38
.Ft void
39
.Fn pmap_clear_modify "vm_page_t m"
40
.Ft void
41
.Fn pmap_clear_reference "vm_page_t m"
42
.Sh DESCRIPTION
43
The
44
.Fn pmap_clear_modify
45
clears the 'modified' bit on the physical page
46
.Fa m .
47
.Pp
48
The
49
.Fn pmap_clear_reference
50
clears the 'referenced' bit on the physical page
51
.Fa m .
52
.Sh SEE ALSO
53
.Xr pmap 9 ,
54
.Xr pmap_is_modified 9 ,
55
.Xr pmap_ts_referenced 9
56
.Sh AUTHORS
57
This man page was written by
58
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_copy.9 (+86 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_copy 9
30
.Sh NAME
31
.Nm pmap_copy ,
32
.Nm pmap_copy_page
33
.Nd copy physical memory pages
34
.Sh SYNOPSIS
35
.In sys/param.h
36
.In vm/vm.h
37
.In vm/pmap.h
38
.Ft void
39
.Fo pmap_copy
40
.Fa "pmap_t dst_pmap"
41
.Fa "pmap_t src_pmap"
42
.Fa "vm_offset_t dst_addr"
43
.Fa "vm_size_t len"
44
.Fa "vm_offset_t src_addr"
45
.Fc
46
.Ft void
47
.Fn pmap_copy_page "vm_page_t src" "vm_page_t dst"
48
.Sh DESCRIPTION
49
The
50
.Fn pmap_copy
51
function copies the range specified by
52
.Fa src_addr
53
and
54
.Fa len
55
from the source physical map
56
.Fa src_pmap
57
to the destination physical map
58
.Fa dst_pmap
59
at the address
60
.Fa dst_addr .
61
.Pp
62
The
63
.Fn pmap_copy_page
64
function
65
copies the physical page
66
.Fa src
67
to the physical page
68
.Fa dst ,
69
by mapping the page into kernel virtual address space, and using
70
.Fn bcopy
71
to copy the page.
72
.Sh NOTES
73
The
74
.Fn pmap_copy
75
routine is only advisory and need not do anything.
76
Actually implementing it may seriously reduce system performance.
77
.Pp
78
The
79
.Fn pmap_copy_page
80
This routine only operates upon a single page.
81
.Sh SEE ALSO
82
.Xr bcopy 3 ,
83
.Xr pmap 9
84
.Sh AUTHORS
85
This man page was written by
86
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_enter.9 (+70 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_enter 9
30
.Sh NAME
31
.Nm pmap_enter
32
.Nd insert a virtual page into a physical map
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fo pmap_enter
39
.Fa "pmap_t pmap"
40
.Fa "vm_offset_t va"
41
.Fa "vm_page_t p"
42
.Fa "vm_prot_t prot"
43
.Fa "boolean_t wired"
44
.Fc
45
.Sh DESCRIPTION
46
The
47
.Fn pmap_enter
48
function inserts the given physical page
49
.Fa p ,
50
into the physical map
51
.Fa pmap ,
52
at the virtual address
53
.Fa va ,
54
with the protection
55
.Fa prot .
56
If
57
.Fa wired
58
is
59
.Dv TRUE ,
60
then increment the wired count for the page as soon as the mapping
61
is entered into
62
.Fa pmap .
63
.Sh NOTES
64
This routine MAY NOT lazy-evaluate the entry; it is required by
65
specification to make the requested entry at the time it is called.
66
.Sh SEE ALSO
67
.Xr pmap 9
68
.Sh AUTHORS
69
This man page was written by
70
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_extract.9 (+56 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_extract 9
30
.Sh NAME
31
.Nm pmap_extract
32
.Nd map a virtual address to a physical address
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft vm_paddr_t
38
.Fn pmap_extract "pmap_t pmap" "vm_offset_t va"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_extract
42
function maps a virtual address to a physical address.
43
.Sh RETURN VALUES
44
The
45
.Fn pmap_extract
46
function will return the physical page address associated with the
47
virtual address
48
.Fa va
49
inside the physical map
50
.Fa pmap .
51
If the mapping does not exist, the result is undefined.
52
.Sh SEE ALSO
53
.Xr pmap 9
54
.Sh AUTHORS
55
This man page was written by
56
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_growkernel.9 (+50 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_growkernel 9
30
.Sh NAME
31
.Nm pmap_growkernel
32
.Nd grow the kernel virtual address space
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_growkernel "vm_offset_t addr"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_growkernel
42
function grows the kernel virtual address space to the virtual address
43
.Fa addr .
44
.Pp
45
It will allocate more page entries if required.
46
.Sh SEE ALSO
47
.Xr pmap 9
48
.Sh AUTHORS
49
This man page was written by
50
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_init.9 (+79 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_init 9
30
.Sh NAME
31
.Nm pmap_init ,
32
.Nm pmap_init2
33
.Nd initialize the pmap subsystem
34
.Sh SYNOPSIS
35
.In sys/param.h
36
.In vm/vm.h
37
.In vm/pmap.h
38
.Ft void
39
.Fn pmap_init "vm_paddr_t phys_start" "vm_paddr_t phys_end"
40
.Ft void
41
.Fn pmap_init2 "void"
42
.Sh DESCRIPTION
43
The
44
.Fn pmap_init
45
function initializes the pmap subsystem.
46
It is called during system initialization by
47
.Fn vm_init ,
48
to initialize any structures that the
49
.Nm
50
system needs in order to map between physical and virtual memory.
51
.Pp
52
.Fn pmap_init
53
has been enhanced to support discontiguous physical memory in a fairly
54
consistent way.
55
The module will manage the range of physical pages between
56
.Fa phys_start
57
and
58
.Fa phys_end .
59
.Pp
60
The
61
.Fn pmap_init2
62
function initializes a zone for the pv entries.
63
These are used to implement page sharing at the physical level.
64
A high water mark is set so that the system can recover from
65
excessive numbers of pv entries.
66
.Sh NOTES
67
If shared memory is heavily used within a system,
68
the default pv entry count can be exhausted.
69
The compile-time kernel tunable
70
.Dv MAP_SHPGPERPROC
71
can be used to increase this high water mark.
72
This tunable was deprecated in
73
.Fx 5.0 ,
74
as the pv entries are now dynamically allocated.
75
.Sh SEE ALSO
76
.Xr pmap 9
77
.Sh AUTHORS
78
This man page was written by
79
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_is_modified.9 (+69 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_is_modified 9
30
.Sh NAME
31
.Nm pmap_is_modified ,
32
.Nm pmap_ts_modified
33
.Nd return information about physical pages
34
.Sh SYNOPSIS
35
.In sys/param.h
36
.In vm/vm.h
37
.In vm/pmap.h
38
.Ft boolean_t
39
.Fn pmap_is_modified "vm_page_t m"
40
.Ft int
41
.Fn pmap_ts_referenced "vm_page_t m"
42
.Sh DESCRIPTION
43
The
44
.Fn pmap_is_modified
45
and
46
.Fn pmap_ts_referenced
47
functions return information about physical pages.
48
.Sh RETURN VALUES
49
The
50
.Fn pmap_is_modified
51
function returns the status of the 'page modified' bit for the
52
physical page
53
.Fa m .
54
.Pp
55
The
56
.Fn pmap_ts_referenced
57
function returns a count of reference bits for a page
58
.Fa m ,
59
clearing those bits.
60
It is not necessary for every reference bit to be cleared, but it is
61
necessary that 0 only be returned when there are truly no reference
62
bits set.
63
.Sh SEE ALSO
64
.Xr pmap 9 ,
65
.Xr pmap_clear_modify 9 ,
66
.Xr pmap_clear_reference 9
67
.Sh AUTHORS
68
This man page was written by
69
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_map.9 (+78 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_map 9
30
.Sh NAME
31
.Nm pmap_map
32
.Nd map a physical memory range into kernel address space
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft vm_offset_t
38
.Fo pmap_map
39
.Fa "vm_offset_t *virt"
40
.Fa "vm_paddr_t start"
41
.Fa "vm_paddr_t end"
42
.Fa "int prot"
43
.Fc
44
.Sh DESCRIPTION
45
The
46
.Fn pmap_map
47
function maps a range of physical addresses into kernel virtual address
48
space, from
49
.Fa start
50
to
51
.Fa end ,
52
with protection bits
53
.Fa prot .
54
.Pp
55
The value passed in
56
.Fa *virt
57
is treated as a hint for the virtual address of the beginning of the mapping.
58
.Sh RETURN VALUES
59
The
60
.Fn pmap_map
61
function returns the virtual address of the beginning of the mapping, if
62
the mapping was successfully made;
63
.Fa *virt
64
will also be updated with the first usable address after the mapped region.
65
.Pp
66
Architectures which can support a direct mapped physical to virtual region
67
can return the appropriate address within that region, leaving
68
.Fa *virt
69
unchanged.
70
.Pp
71
If the function is unsuccessful,
72
.Dv NULL
73
is returned.
74
.Sh SEE ALSO
75
.Xr pmap 9
76
.Sh AUTHORS
77
This man page was written by
78
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_mincore.9 (+66 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_mincore 9
30
.Sh NAME
31
.Nm pmap_mincore
32
.Nd determine if a virtual address is resident in physical memory
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft int
38
.Fn pmap_mincore "pmap_t pmap" "vm_offset_t addr"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_mincore
42
function determines if the page at the virtual address
43
.Fa addr
44
in the physical map
45
.Fa pmap
46
is resident in physical memory.
47
.Sh RETURN VALUES
48
If the page is resident in physical memory,
49
a mask of flags is returned,
50
whose meaning is documented in
51
.Xr mincore 2 ;
52
otherwise,
53
.Li 0
54
is returned.
55
.Pp
56
The
57
.Fa pmap
58
must exist and
59
.Fa addr
60
must be mapped into it, otherwise the results are undefined.
61
.Sh SEE ALSO
62
.Xr mincore 2 ,
63
.Xr pmap 9
64
.Sh AUTHORS
65
This man page was written by
66
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_object_init_pt.9 (+76 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_object_init_pt 9
30
.Sh NAME
31
.Nm pmap_object_init_pt
32
.Nd initialize page tables for a vm_object
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fo pmap_object_init_pt
39
.Fa "pmap_t pmap"
40
.Fa "vm_offset_t addr"
41
.Fa "vm_object_t object"
42
.Fa "vm_pindex_t pindex"
43
.Fa "vm_size_t size"
44
.Fa "int limit"
45
.Fc
46
.Sh DESCRIPTION
47
The
48
.Fn pmap_object_init_pt
49
function preloads the page table entries into the specified physical map
50
.Fa pmap ,
51
for the given
52
.Fa object
53
at the virtual address
54
.Fa addr ,
55
for
56
.Fa size
57
bytes, beginning at the page index
58
.Fa pindex
59
within the object.
60
The map bits
61
.Fa limit
62
are heeded when creating the mapping.
63
.Sh NOTES
64
This function is not strictly required by an architecture's
65
.Xr pmap 9
66
implementation, but it does provide performance benefits if implemented.
67
.Pp
68
It is intended to eliminate the blast of soft faults on process
69
startup, and immediately following a call to
70
.Xr mmap 2 .
71
.Sh SEE ALSO
72
.Xr pmap 9 ,
73
.Xr vm_map 9
74
.Sh AUTHORS
75
This man page was written by
76
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_page_exists_quick.9 (+65 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_page_exists_quick 9
30
.Sh NAME
31
.Nm pmap_page_exists_quick
32
.Nd determine if a page exists
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft boolean_t
38
.Fn pmap_page_exists_quick "pmap_t pmap" "vm_page_t m"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_page_exists_quick
42
function is used to quickly deterimne if the page
43
.Fa m
44
exists in the physical map
45
.Fa pmap .
46
It is typically called from the VM paging code.
47
.Sh RETURN VALUES
48
The
49
.Fn pmap_page_exists_quick
50
returns
51
.Dv TRUE
52
if and only if the pv entry for the physical map
53
.Fa pmap
54
is one of the first 16 pvs linked to from the page
55
.Fa m .
56
.Sh NOTES
57
The pv count used above may be changed upwards or downwards in future;
58
it is only necessary that
59
.Dv TRUE
60
be returned for a small subset of pmaps for proper page aging.
61
.Sh SEE ALSO
62
.Xr pmap 9
63
.Sh AUTHORS
64
This man page was written by
65
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_page_protect.9 (+64 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_protect 9
30
.Sh NAME
31
.Nm pmap_page_protect ,
32
.Nm pmap_protect
33
.Nd set physical page protection
34
.Sh SYNOPSIS
35
.In sys/param.h
36
.In vm/vm.h
37
.In vm/pmap.h
38
.Ft void
39
.Fn pmap_page_protect "vm_page_t m" "vm_prot_t prot"
40
.Ft void
41
.Fn pmap_protect "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva" "vm_prot_t pr
42
.Sh DESCRIPTION
43
The
44
.Fn pmap_page_protect
45
function lowers the physical page permissions to
46
.Fa prot
47
for all mappings of a given page
48
.Fa m .
49
.Pp
50
The
51
.Fn pmap_protect
52
function sets the physical page permissions to
53
.Fa prot
54
for all physical pages in the physical map
55
.Fa pmap
56
in the virtual address range between
57
.Fa sva
58
and
59
.Fa eva .
60
.Sh SEE ALSO
61
.Xr pmap 9
62
.Sh AUTHORS
63
This man page was written by
64
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_pinit.9 (+83 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_pinit 9
30
.Sh NAME
31
.Nm pmap_pinit ,
32
.Nm pmap_pinit0 ,
33
.Nm pmap_pinit2
34
.Nd initialize pmap structures
35
.Sh SYNOPSIS
36
.In sys/param.h
37
.In vm/vm.h
38
.In vm/pmap.h
39
.Ft void
40
.Fn pmap_pinit "pmap_t pmap"
41
.Ft void
42
.Fn pmap_pinit0 "pmap_t pm"
43
.Ft void
44
.Fn pmap_pinit2 "pmap_t pmap"
45
.Sh DESCRIPTION
46
The
47
.Fn pmap_pinit
48
function initializes the preallocated and zeroed structure
49
.Fa pmap ,
50
such as one in a vmspace structure.
51
.Pp
52
The
53
.Fn pmap_pinit0
54
function initializes the physical map
55
.Fa pm ,
56
associated with process 0, the first process created in the system.
57
.Pp
58
The
59
.Fn pmap_pinit2
60
function wires in kernel global address entries for the physical map
61
.Fa pmap ,
62
which must be associated with a user process.
63
It is called during process creation.
64
.Pp
65
To avoid a race condition between
66
.Fa pmap
67
intialization and
68
.Fn pmap_growkernel ,
69
.Fn pmap_pinit2
70
should be called after the vmspace
71
is attached to the process but before this
72
.Fa pmap
73
is activated.
74
.Sh NOTES
75
The
76
.Fn pmap_pinit2
77
function has been deprecated, and should be implemented as a stub
78
until further notice.
79
.Sh SEE ALSO
80
.Xr pmap 9
81
.Sh AUTHORS
82
This man page was written by
83
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_prefault.9 (+67 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_prefault 9
30
.Sh NAME
31
.Nm pmap_prefault
32
.Nd cluster page faults into a process address space
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_prefault "pmap_t pmap" "vm_offset_t addra" "vm_map_entry_t entry"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_prefault
42
function provides a means of clustering pagefaults into a process's
43
address space.
44
It operates upon the physical map
45
.Fa pmap .
46
The
47
.Fa entry
48
argument specifies the entry to be prefaulted; the
49
.Fa addra
50
argument specifies the beginning of the mapping in the process's virtual
51
address space.
52
.Pp
53
It is typically called by
54
.Fn vm_fault
55
after the first page fault.
56
It benefits the
57
.Fn exec
58
system call by eliminating repetitive calls to
59
.Fn vm_fault ,
60
which would otherwise be made to bring the process's executable pages
61
into physical memory.
62
.Sh SEE ALSO
63
.Xr execve 2 ,
64
.Xr pmap 9
65
.Sh AUTHORS
66
This man page was written by
67
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_qenter.9 (+77 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23
.\" SUCH DAMAGE.
24
.\"
25
.\" $FreeBSD$
26
.\"
27
.Dd July 21, 2003
28
.Dt pmap_qenter 9
29
.Sh NAME
30
.Nm pmap_qenter ,
31
.Nm pmap_qremove
32
.Nd manage temporary kernel space mappings
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_qenter "vm_offset_t sva" "vm_page_t *m" "int count"
39
.Ft void
40
.Fn pmap_qremove "vm_offset_t sva" "int count"
41
.Sh DESCRIPTION
42
The
43
.Fn pmap_qenter
44
function accepts a linear array of
45
.Fa count
46
pointers to wired pages
47
.Fa *m ,
48
and enters each of these pages into the kernel virtual address space,
49
beginning at the address
50
.Fa sva .
51
.Pp
52
The
53
.Fn pmap_qremove
54
function tears out a mapping from the kernel virtual address space,
55
beginning at
56
.Fa sva
57
and for
58
.Fa count
59
pages.
60
.Sh NOTES
61
The
62
.Fn pmap_qenter
63
function is intended for temporary mappings that do not require page
64
modification or reference counting.
65
Old mappings are simply overwritten.
66
The pages
67
.Em must
68
be wired into physical memory.
69
.Pp
70
The corresponding
71
.Fn pmap_qremove
72
function is intended to remove such temporary mappings.
73
.Sh SEE ALSO
74
.Xr pmap 9
75
.Sh AUTHORS
76
This man page was written by
77
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_release.9 (+56 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_release 9
30
.Sh NAME
31
.Nm pmap_release
32
.Nd release resources held by a physical map
33
.Sh SYNOPSIS
34
.In sys/param.h
35
.In vm/vm.h
36
.In vm/pmap.h
37
.Ft void
38
.Fn pmap_release "pmap_t pmap"
39
.Sh DESCRIPTION
40
The
41
.Fn pmap_release
42
function releases any resources held by the physical map
43
.Fa pmap .
44
Called when a pmap initialized by the corresponding function,
45
.Fn pmap_pinit
46
is being released.
47
.Sh NOTES
48
This function should only be called if
49
.Fa pmap
50
no longer contains any valid mappings.
51
.Sh SEE ALSO
52
.Xr pmap 9 ,
53
.Xr pmap_pinit 9
54
.Sh AUTHORS
55
This man page was written by
56
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_remove.9 (+87 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_remove 9
30
.Sh NAME
31
.Nm pmap_remove ,
32
.Nm pmap_remove_all ,
33
.Nm pmap_remove_pages
34
.Nd remove pages from a physical map
35
.Sh SYNOPSIS
36
.In sys/param.h
37
.In vm/vm.h
38
.In vm/pmap.h
39
.Ft void
40
.Fn pmap_remove "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva"
41
.Ft void
42
.Fn pmap_remove_all "vm_page_t m"
43
.Ft void
44
.Fn pmap_remove_pages "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva"
45
.Sh DESCRIPTION
46
The
47
.Fn pmap_remove
48
function removes the range of addresses between
49
.Fa sva
50
and
51
.Fa eva
52
from the physical map
53
.Fa pmap .
54
If
55
.Fa eva
56
is less than
57
.Fa sva ,
58
then the result is undefined.
59
It is assumed that both
60
.Fa sva
61
and
62
.Fa eva
63
are page-aligned addresses.
64
.Pp
65
The
66
.Fn pmap_remove_all
67
removes the physical page
68
.Fa m
69
from all physical maps in which it resides, and reflects back the modify
70
bits to the appropriate pager.
71
.Pp
72
The
73
.Fn pmap_remove_pages
74
function removes all pages from the physical map
75
.Fa pmap ,
76
within the range of physical addresses bounded by
77
.Fa sva
78
and
79
.Fa eva .
80
This function is called when a process exits to run down its address space
81
more quickly than would be the case for calling
82
.Fn pmap_remove .
83
.Sh SEE ALSO
84
.Fn pmap 9
85
.Sh AUTHORS
86
This man page was written by
87
.An Bruce M Simpson Aq bms@spc.org .
(-)/usr/src/share/man/man9/pmap_zero_page.9 (+71 lines)
Line 0 Link Here
1
.\"
2
.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
3
.\" All rights reserved.
4
.\"
5
.\" Redistribution and use in source and binary forms, with or without
6
.\" modification, are permitted provided that the following conditions
7
.\" are met:
8
.\" 1. Redistributions of source code must retain the above copyright
9
.\"    notice, this list of conditions and the following disclaimer.
10
.\" 2. Redistributions in binary form must reproduce the above copyright
11
.\"    notice, this list of conditions and the following disclaimer in the
12
.\"    documentation and/or other materials provided with the distribution.
13
.\"
14
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
.\" SUCH DAMAGE.
25
.\"
26
.\" $FreeBSD$
27
.\"
28
.Dd July 21, 2003
29
.Dt pmap_zero_page 9
30
.Sh NAME
31
.Nm pmap_zero_page ,
32
.Nm pmap_zero_area ,
33
.Nm pmap_zero_idle
34
.Nd zero-fill a page using machine-dependent optimizations
35
.Sh SYNOPSIS
36
.In sys/param.h
37
.In vm/vm.h
38
.In vm/pmap.h
39
.Ft void
40
.Fn pmap_zero_page "vm_page_t m"
41
.Ft void
42
.Fn pmap_zero_page_area "vm_page_t m" "int off" "int size"
43
.Ft void
44
.Fn pmap_zero_page_idle "vm_page_t m"
45
.Sh DESCRIPTION
46
The
47
.Fn pmap_zero_page
48
function zero-fills an entire page using machine-dependent optimizations.
49
The
50
.Fn pmap_zero_page_area
51
function is used to zero-fill an area of a page.
52
The range specified must not cross a page boundary; it must be contained
53
entirely within a single page.
54
.Pp
55
The
56
.Fn pmap_zero_page_idle
57
interface is used by the 
58
.Em vm_pagezero
59
process.
60
The system-wide
61
.Fa Giant
62
lock should not be required to be held in order to call this interface.
63
.Sh NOTES
64
This function is required to be implemented for each architecture supported by
65
.Fx .
66
.Sh SEE ALSO
67
.Xr bzero 3 ,
68
.Xr pmap 9
69
.Sh AUTHORS
70
This man page was written by
71
.An Bruce M Simpson Aq bms@spc.org .

Return to bug 54691