FreeBSD/Linux Kernel Cross Reference
sys/man/vm_wire.man
1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
4 .\" All Rights Reserved.
5 .\"
6 .\" Permission to use, copy, modify and distribute this software and its
7 .\" documentation is hereby granted, provided that both the copyright
8 .\" notice and this permission notice appear in all copies of the
9 .\" software, derivative works or modified versions, and any portions
10 .\" thereof, and that both notices appear in supporting documentation.
11 .\"
12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 .\"
16 .\" Carnegie Mellon requests users of this software to return to
17 .\"
18 .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 .\" School of Computer Science
20 .\" Carnegie Mellon University
21 .\" Pittsburgh PA 15213-3890
22 .\"
23 .\" any improvements or extensions that they make and grant Carnegie Mellon
24 .\" the rights to redistribute these changes.
25 .\"
26 .\"
27 .\" HISTORY
28 .\" $Log: vm_wire.man,v $
29 .\" Revision 2.3 93/05/10 19:34:14 rvb
30 .\" updated
31 .\" [93/04/21 16:09:06 lli]
32 .\"
33 .\" Revision 2.2 91/12/11 08:43:31 jsb
34 .\" Created.
35 .\" [91/11/25 rpd]
36 .\"
37 .TH vm_wire 2 9/19/86
38 .CM 4
39 .SH NAME
40 .nf
41 vm_wire \- control pageability of memory
42 .SH SYNOPSIS
43 .nf
44 .ft B
45 #include <mach.h>
46
47 .nf
48 .ft B
49 kern_return_t vm_wire(host_priv, task, address, size, access)
50 mach_port_t host_priv;
51 mach_port_t task;
52 vm_address_t address;
53 vm_size_t size;
54 vm_prot_t access;
55 .fi
56 .ft P
57 .SH ARGUMENTS
58 .TP 15
59 .B
60 host_priv
61 The privileged host port for the host on which the task resides.
62 .TP 15
63 .B
64 task
65 Task whose virtual memory is to be affected.
66 .TP 15
67 .B
68 address
69 Starting address (will be rounded down to a
70 page boundary).
71 .TP 15
72 .B
73 size
74 Size in bytes of the region for which protection
75 is to change (will be rounded up to give a page boundary).
76 .TP 15
77 .B
78 access
79 Types of accesses that must not cause page faults.
80 .SH DESCRIPTION
81 \fBvm_wire\fR allows privileged applications to control memory
82 pageability. The semantics of a successful \fBvm_wire\fR operation
83 are that memory in the specified range will not cause page faults for
84 any accesses included in \fBaccess\fR. Data memory can be made
85 non-pageable (wired) with a \fBaccess\fR argument of
86 \fBVM_PROT_READ|VM_PROT_WRITE\fR. A special case is that
87 \fBVM_PROT_NONE\fR makes the memory pageable.
88 .SH DIAGNOSTICS
89 .TP 25
90 KERN_SUCCESS
91 The call succeeded.
92 .TP 25
93 KERN_INVALID_HOST
94 \fBhost_priv\fR is not the privileged host port.
95 .TP 25
96 KERN_INVALID_TASK
97 \fBtask\fR is not a valid task.
98 .TP 25
99 KERN_INVALID_VALUE
100 \fBaccess\fR specified an invalid access mode.
101 .TP 25
102 KERN_FAILURE
103 Some memory in the specified range is not present
104 or has an inappropriate protection value.
105 .TP 25
106 KERN_INVALID_ARGUMENT
107 Unwiring (\fBaccess\fR is \fBVM_PROT_NONE\fR) and the memory
108 is not already wired.
109 .PP
110 The \fBmach_port_allocate\fR call is actually an RPC to
111 \fBhost_priv\fR, normally a send right for a privileged host port, but
112 potentially any send right. In addition to the normal diagnostic
113 return codes from the call's server (normally the kernel), the call
114 may return \fBmach_msg(2)\fR return codes.
115 .SH SEE ALSO
116 thread_wire(2).
Cache object: a7df9fbcb52db527be2ae5ef16adaf64
|