xref: /xnu-8792.81.2/osfmk/man/memory_object_data_request.html (revision 19c3b8c28c31cb8130e034cfb5df6bf9ba342d90)
1*19c3b8c2SApple OSS Distributions<h2>memory_object_data_request</h2>
2*19c3b8c2SApple OSS Distributions<hr>
3*19c3b8c2SApple OSS Distributions<p>
4*19c3b8c2SApple OSS Distributions<strong>Server Interface</strong> - Request that memory manager page-in specified data.
5*19c3b8c2SApple OSS Distributions<h3>SYNOPSIS</h3>
6*19c3b8c2SApple OSS Distributions<pre>
7*19c3b8c2SApple OSS Distributions<strong>kern_return_t   memory_object_data_request</strong>
8*19c3b8c2SApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
9*19c3b8c2SApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
10*19c3b8c2SApple OSS Distributions                 <strong>vm_offset_t</strong>                             <var>offset</var>,
11*19c3b8c2SApple OSS Distributions                 <strong>vm_size_t</strong>                               <var>length</var>,
12*19c3b8c2SApple OSS Distributions                 <strong>vm_prot_t</strong>                       <var>desired_access</var><strong>);</strong>
13*19c3b8c2SApple OSS Distributions
14*19c3b8c2SApple OSS Distributions
15*19c3b8c2SApple OSS Distributions<strong>kern_return_t   seqnos_memory_object_data_request</strong>
16*19c3b8c2SApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
17*19c3b8c2SApple OSS Distributions                 <strong>mach_port_seqno_t</strong>                        <var>seqno</var>,
18*19c3b8c2SApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
19*19c3b8c2SApple OSS Distributions                 <strong>vm_offset_t</strong>                             <var>offset</var>,
20*19c3b8c2SApple OSS Distributions                 <strong>vm_size_t</strong>                               <var>length</var>,
21*19c3b8c2SApple OSS Distributions                 <strong>vm_prot_t</strong>                       <var>desired_access</var><strong>);</strong>
22*19c3b8c2SApple OSS Distributions</pre>
23*19c3b8c2SApple OSS Distributions<h3>PARAMETERS</h3>
24*19c3b8c2SApple OSS Distributions<dl>
25*19c3b8c2SApple OSS Distributions<p>
26*19c3b8c2SApple OSS Distributions<dt> <var>memory_object</var>
27*19c3b8c2SApple OSS Distributions<dd>
28*19c3b8c2SApple OSS Distributions[in abstract-memory-object (receive) right]
29*19c3b8c2SApple OSS DistributionsThe abstract memory
30*19c3b8c2SApple OSS Distributionsobject port that represents the memory object data.
31*19c3b8c2SApple OSS Distributions<p>
32*19c3b8c2SApple OSS Distributions<dt> <var>seqno</var>
33*19c3b8c2SApple OSS Distributions<dd>
34*19c3b8c2SApple OSS Distributions[in scalar]
35*19c3b8c2SApple OSS DistributionsThe sequence number of this message relative to the abstract
36*19c3b8c2SApple OSS Distributionsmemory object port.
37*19c3b8c2SApple OSS Distributions<p>
38*19c3b8c2SApple OSS Distributions<dt> <var>memory_control</var>
39*19c3b8c2SApple OSS Distributions<dd>
40*19c3b8c2SApple OSS Distributions[in memory-cache-control send right]
41*19c3b8c2SApple OSS DistributionsThe memory cache control port
42*19c3b8c2SApple OSS Distributionsto be used for a response by the memory manager.  If the memory
43*19c3b8c2SApple OSS Distributionsobject has been supplied to more than one kernel, this parameter
44*19c3b8c2SApple OSS Distributionsidentifies the kernel that is making the call.
45*19c3b8c2SApple OSS Distributions<p>
46*19c3b8c2SApple OSS Distributions<dt> <var>offset</var>
47*19c3b8c2SApple OSS Distributions<dd>
48*19c3b8c2SApple OSS Distributions[in scalar]
49*19c3b8c2SApple OSS DistributionsThe offset within the memory object.
50*19c3b8c2SApple OSS Distributions<p>
51*19c3b8c2SApple OSS Distributions<dt> <var>length</var>
52*19c3b8c2SApple OSS Distributions<dd>
53*19c3b8c2SApple OSS Distributions[in scalar]
54*19c3b8c2SApple OSS DistributionsThe number of bytes requested, starting at <var>offset</var>.  The
55*19c3b8c2SApple OSS Distributionsnumber converts to an integral number of virtual pages.
56*19c3b8c2SApple OSS Distributions<p>
57*19c3b8c2SApple OSS Distributions<dt> <var>desired_access</var>
58*19c3b8c2SApple OSS Distributions<dd>
59*19c3b8c2SApple OSS Distributions[in scalar]
60*19c3b8c2SApple OSS DistributionsThe memory access modes to be allowed for the cached
61*19c3b8c2SApple OSS Distributionsdata.  Possible values are obtained by or'ing together the following
62*19c3b8c2SApple OSS Distributionsvalues:
63*19c3b8c2SApple OSS Distributions<dl>
64*19c3b8c2SApple OSS Distributions<p>
65*19c3b8c2SApple OSS Distributions<dt> <strong>VM_PROT_READ</strong>
66*19c3b8c2SApple OSS Distributions<dd>
67*19c3b8c2SApple OSS DistributionsAllows read access.
68*19c3b8c2SApple OSS Distributions<p>
69*19c3b8c2SApple OSS Distributions<dt> <strong>VM_PROT_WRITE</strong>
70*19c3b8c2SApple OSS Distributions<dd>
71*19c3b8c2SApple OSS DistributionsAllows write access.
72*19c3b8c2SApple OSS Distributions<p>
73*19c3b8c2SApple OSS Distributions<dt> <strong>VM_PROT_EXECUTE</strong>
74*19c3b8c2SApple OSS Distributions<dd>
75*19c3b8c2SApple OSS DistributionsAllows execute access.
76*19c3b8c2SApple OSS Distributions</dl>
77*19c3b8c2SApple OSS Distributions</dl>
78*19c3b8c2SApple OSS Distributions<h3>DESCRIPTION</h3>
79*19c3b8c2SApple OSS Distributions<p>
80*19c3b8c2SApple OSS DistributionsA <strong>memory_object_data_request</strong> function is called as
81*19c3b8c2SApple OSS Distributionsthe result of a kernel
82*19c3b8c2SApple OSS Distributionsmessage requesting data from the specified memory object, for at least the
83*19c3b8c2SApple OSS Distributionsaccess specified.
84*19c3b8c2SApple OSS Distributions<p>
85*19c3b8c2SApple OSS DistributionsThe kernel issues this call after a cache miss (that is, a page
86*19c3b8c2SApple OSS Distributionsfault for which the
87*19c3b8c2SApple OSS Distributionskernel does not have the data).  The kernel requests only amounts
88*19c3b8c2SApple OSS Distributionsof data that are
89*19c3b8c2SApple OSS Distributionsmultiples of the page size included in the
90*19c3b8c2SApple OSS Distributions<strong>memory_object_init</strong> or <strong>memory_object_create</strong> call.
91*19c3b8c2SApple OSS Distributions<p>
92*19c3b8c2SApple OSS DistributionsThe memory manager is expected to use <strong>memory_object_data_supply</strong> to
93*19c3b8c2SApple OSS Distributionsreturn at least the specified data, with as much access as it
94*19c3b8c2SApple OSS Distributionscan allow.  If the
95*19c3b8c2SApple OSS Distributionsmemory manager cannot provide the data (for example, because
96*19c3b8c2SApple OSS Distributionsof a hardware error),
97*19c3b8c2SApple OSS Distributionsit can use the <strong>memory_object_data_error</strong> call.  The
98*19c3b8c2SApple OSS Distributionsmemory manager can also
99*19c3b8c2SApple OSS Distributionsuse <strong>memory_object_data_unavailable</strong> to tell the kernel
100*19c3b8c2SApple OSS Distributionsto supply zero-filled
101*19c3b8c2SApple OSS Distributionsmemory for the region.
102*19c3b8c2SApple OSS Distributions<h3>RETURN VALUES</h3>
103*19c3b8c2SApple OSS Distributions<p>
104*19c3b8c2SApple OSS DistributionsOnly generic errors apply.
105*19c3b8c2SApple OSS Distributions<h3>RELATED INFORMATION</h3>
106*19c3b8c2SApple OSS Distributions<p>
107*19c3b8c2SApple OSS DistributionsFunctions:
108*19c3b8c2SApple OSS Distributions<a href="memory_object_data_error.html"><strong>memory_object_data_error</strong></a>,
109*19c3b8c2SApple OSS Distributions<a href="memory_object_data_supply.html"><strong>memory_object_data_supply</strong></a>,
110*19c3b8c2SApple OSS Distributions<a href="MO_data_unavailable.html"><strong>memory_object_data_unavailable</strong></a>,
111*19c3b8c2SApple OSS Distributions<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
112*19c3b8c2SApple OSS Distributions<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.
113*19c3b8c2SApple OSS Distributions
114