xref: /xnu-11417.121.6/osfmk/mach/vm32_map.defs (revision a1e26a70f38d1d7daa7b49b258e2f8538ad81650)
1/*
2 * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28/*
29 * @OSF_FREE_COPYRIGHT@
30 */
31/*
32 * Mach Operating System
33 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
34 * All Rights Reserved.
35 *
36 * Permission to use, copy, modify and distribute this software and its
37 * documentation is hereby granted, provided that both the copyright
38 * notice and this permission notice appear in all copies of the
39 * software, derivative works or modified versions, and any portions
40 * thereof, and that both notices appear in supporting documentation.
41 *
42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
43 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
45 *
46 * Carnegie Mellon requests users of this software to return to
47 *
48 *  Software Distribution Coordinator  or  [email protected]
49 *  School of Computer Science
50 *  Carnegie Mellon University
51 *  Pittsburgh PA 15213-3890
52 *
53 * any improvements or extensions that they make and grant Carnegie Mellon
54 * the rights to redistribute these changes.
55 */
56/*
57 */
58/*
59 *	File:	mach/vm_map.defs
60 *
61 *	Exported kernel VM calls for 32-bit client tasks.
62 */
63
64subsystem
65#if	KERNEL_SERVER || KOBJECT_SERVER
66	KernelServer
67#endif	/* KERNEL_SERVER || KOBJECT_SERVER */
68	  vm32_map 3800;
69
70#if KERNEL_SERVER
71#define VM_KERNEL_SERVER 1
72#define PREFIX(x) vm32_##x
73#else
74#define PREFIX(x) x
75#endif
76
77#include <mach/std_types.defs>
78#include <mach/mach_types.defs>
79#include <mach_debug/mach_debug_types.defs>
80
81#ifdef VM32_SUPPORT
82
83/* See vm_map.defs for more information */
84
85routine PREFIX(vm_region)(
86                target_task     : vm_map_read_t;
87	inout	address		: vm32_address_t;
88        out     size            : vm32_size_t;
89		flavor		: vm_region_flavor_t;
90	out	info		: vm_region_info_t, CountInOut;
91        out     object_name     : memory_object_name_t =
92                                        MACH_MSG_TYPE_MOVE_SEND
93                                        ctype: mach_port_t);
94
95routine PREFIX(vm_allocate)(
96		target_task	: vm_task_entry_t;
97	inout	address		: vm32_address_t;
98		size		: vm32_size_t;
99		flags		: int);
100
101routine PREFIX(vm_deallocate)(
102		target_task	: vm_task_entry_t;
103		address		: vm32_address_t;
104		size		: vm32_size_t);
105
106routine PREFIX(vm_protect)(
107		target_task	: vm_task_entry_t;
108		address		: vm32_address_t;
109		size		: vm32_size_t;
110		set_maximum	: boolean_t;
111		new_protection	: vm_prot_t);
112
113routine PREFIX(vm_inherit)(
114		target_task	: vm_task_entry_t;
115		address		: vm32_address_t;
116		size		: vm32_size_t;
117		new_inheritance	: vm_inherit_t);
118
119routine PREFIX(vm_read)(
120		target_task	: vm_map_read_t;
121		address		: vm32_address_t;
122		size		: vm32_size_t;
123	out	data		: pointer_t);
124
125routine PREFIX(vm_read_list)(
126		target_task 	: vm_map_read_t;
127	inout	data_list   	: vm32_read_entry_t;
128		count		: natural_t);
129
130routine PREFIX(vm_write)(
131		target_task	: vm_map_t;
132		address		: vm32_address_t;
133		data		: pointer_t);
134
135routine PREFIX(vm_copy)(
136		target_task	: vm_map_t;
137		source_address	: vm32_address_t;
138		size		: vm32_size_t;
139		dest_address	: vm32_address_t);
140
141routine PREFIX(vm_read_overwrite)(
142		target_task	: vm_map_read_t;
143		address		: vm32_address_t;
144		size		: vm32_size_t;
145		data		: vm32_address_t;
146	out	outsize		: vm32_size_t);
147
148
149routine PREFIX(vm_msync)(
150		target_task	: vm_map_t;
151		address		: vm32_address_t;
152		size		: vm32_size_t;
153		sync_flags	: vm_sync_t);
154
155routine PREFIX(vm_behavior_set)(
156		target_task	: vm_map_t;
157		address		: vm32_address_t;
158		size		: vm32_size_t;
159		new_behavior	: vm_behavior_t);
160
161routine PREFIX(vm_map)(
162		target_task	: vm_task_entry_t;
163	inout	address		: vm32_address_t;
164		size		: vm32_size_t;
165		mask		: vm32_address_t;
166		flags		: int;
167		object		: mem_entry_name_port_t;
168		offset		: vm32_offset_t;
169		copy		: boolean_t;
170		cur_protection	: vm_prot_t;
171		max_protection	: vm_prot_t;
172		inheritance	: vm_inherit_t);
173
174routine PREFIX(vm_machine_attribute)(
175		target_task	: vm_map_t;
176		address		: vm32_address_t;
177		size		: vm32_size_t;
178		attribute	: vm_machine_attribute_t;
179	inout	value		: vm_machine_attribute_val_t);
180
181routine PREFIX(vm_remap)(
182		target_task	: vm_map_t;
183	inout	target_address	: vm32_address_t;
184		size		: vm32_size_t;
185		mask		: vm32_address_t;
186		anywhere	: boolean_t;
187		src_task	: vm_map_t;
188		src_address	: vm32_address_t;
189		copy		: boolean_t;
190	out	cur_protection	: vm_prot_t;
191	out	max_protection	: vm_prot_t;
192		inheritance	: vm_inherit_t);
193
194routine PREFIX(task_wire)(
195		target_task	: vm_map_t;
196		must_wire	: boolean_t);
197
198routine PREFIX(mach_make_memory_entry)(
199		target_task	:vm_map_t;
200	inout	size		:vm32_size_t;
201		offset		:vm32_offset_t;
202		permission	:vm_prot_t;
203	out	object_handle	:mem_entry_name_port_move_send_t;
204		parent_entry	:mem_entry_name_port_t);
205
206routine PREFIX(vm_map_page_query)(
207                target_map      :vm_map_read_t;
208                offset          :vm32_offset_t;
209        out     disposition     :integer_t;
210        out     ref_count       :integer_t);
211
212routine PREFIX(mach_vm_region_info)(
213		task		: vm_map_read_t;
214		address		: vm32_address_t;
215	out	region		: vm_info_region_t;
216	out	objects		: vm_info_object_array_t);
217
218routine PREFIX(vm_mapped_pages_info)(
219		task		: vm_map_read_t;
220	out	pages		: page_address_array_t);
221
222skip; /* was vm_region_object_create */
223
224routine PREFIX(vm_region_recurse)(
225                target_task     : vm_map_read_t;
226	inout	address		: vm32_address_t;
227        out     size            : vm32_size_t;
228	inout	nesting_depth	: natural_t;
229	out	info		: vm_region_recurse_info_t,CountInOut);
230
231routine PREFIX(vm_region_recurse_64)(
232                target_task     : vm_map_read_t;
233	inout	address		: vm32_address_t;
234        out     size            : vm32_size_t;
235	inout	nesting_depth	: natural_t;
236	out	info		: vm_region_recurse_info_t,CountInOut);
237
238routine PREFIX(mach_vm_region_info_64)(
239		task		: vm_map_read_t;
240		address		: vm32_address_t;
241	out	region		: vm_info_region_64_t;
242	out	objects		: vm_info_object_array_t);
243
244routine PREFIX(vm_region_64)(
245                target_task     : vm_map_read_t;
246	inout	address		: vm32_address_t;
247        out     size            : vm32_size_t;
248		flavor		: vm_region_flavor_t;
249	out	info		: vm_region_info_t, CountInOut;
250        out     object_name     : memory_object_name_t =
251                                        MACH_MSG_TYPE_MOVE_SEND
252                                        ctype: mach_port_t);
253
254routine PREFIX(mach_make_memory_entry_64)(
255		target_task	:vm_map_t;
256	inout	size		:memory_object_size_t;
257		offset		:memory_object_offset_t;
258		permission	:vm_prot_t;
259	out	object_handle	:mach_port_move_send_t;
260		parent_entry	:mem_entry_name_port_t);
261
262
263
264routine PREFIX(vm_map_64)(
265		target_task	: vm_task_entry_t;
266	inout	address		: vm32_address_t;
267		size		: vm32_size_t;
268		mask		: vm32_address_t;
269		flags		: int;
270		object		: mem_entry_name_port_t;
271		offset		: memory_object_offset_t;
272		copy		: boolean_t;
273		cur_protection	: vm_prot_t;
274		max_protection	: vm_prot_t;
275		inheritance	: vm_inherit_t);
276
277skip; /* was vm_map_get_upl */
278skip; /* was vm_upl_map */
279skip; /* was vm_upl_unmap */
280
281routine PREFIX(vm_purgable_control)(
282		target_task	: vm_map_t;
283		address		: vm32_address_t;
284		control		: vm_purgable_t;
285	inout	state		: int);
286
287
288routine PREFIX(vm_map_exec_lockdown)(
289		target_task : vm_map_t);
290
291
292#endif /* VM32_SUPPORT */
293
294/* vim: set ft=c : */
295