]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
fe8ab488 | 2 | * Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved. |
1c79356b | 3 | * |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
1c79356b | 5 | * |
2d21ac55 A |
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. | |
8f6c56a5 | 14 | * |
2d21ac55 A |
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 | |
8f6c56a5 A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
2d21ac55 A |
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. | |
8f6c56a5 | 25 | * |
2d21ac55 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
1c79356b A |
27 | */ |
28 | /* | |
29 | * @OSF_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 Software.Distribution@CS.CMU.EDU | |
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 | * File: device/device.defs | |
58 | * Author: Douglas Orr | |
59 | * Feb 10, 1988 | |
60 | * Abstract: | |
61 | * Mach device support. Mach devices are accessed through | |
62 | * block and character device interfaces to the kernel. | |
63 | */ | |
64 | ||
65 | subsystem | |
66 | #if KERNEL_SERVER | |
67 | KernelServer | |
68 | #endif /* KERNEL_SERVER */ | |
69 | iokit 2800; | |
70 | ||
39236c6e A |
71 | #if IOKITSIMD || KERNEL_SERVER |
72 | #define IOKIT_ALL_IPC 1 | |
73 | #endif | |
74 | ||
1c79356b A |
75 | #include <mach/std_types.defs> |
76 | #include <mach/mach_types.defs> | |
77 | #include <mach/clock_types.defs> | |
78 | #include <mach/clock_types.defs> | |
79 | ||
2d21ac55 A |
80 | #if !__LP64__ |
81 | # define __ILP32__ 1 | |
82 | #endif | |
83 | ||
1c79356b A |
84 | import <device/device_types.h>; |
85 | ||
86 | serverprefix is_; | |
87 | ||
88 | type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic | |
89 | ctype: mach_port_t; | |
90 | ||
91 | #if IOKIT | |
92 | ||
2d21ac55 A |
93 | type io_name_t = c_string[*:128]; |
94 | type io_string_t = c_string[*:512]; | |
3e170ce0 | 95 | type io_string_inband_t = c_string[*:4096]; |
2d21ac55 A |
96 | type io_struct_inband_t = array[*:4096] of char; |
97 | type io_buf_ptr_t = ^array[] of MACH_MSG_TYPE_INTEGER_8; | |
98 | type NDR_record_t = struct[8] of char; | |
99 | ||
100 | #if KERNEL | |
101 | type io_user_scalar_t = uint64_t; | |
102 | type io_user_reference_t = uint64_t; | |
103 | type io_scalar_inband_t = array[*:16] of int; | |
b0d623f7 | 104 | // must be the same type as OSAsyncReference |
2d21ac55 A |
105 | type io_async_ref_t = array[*:8] of natural_t; |
106 | type io_scalar_inband64_t = array[*:16] of io_user_scalar_t; | |
107 | type io_async_ref64_t = array[*:8] of io_user_reference_t; | |
108 | #elif __LP64__ | |
109 | type io_user_scalar_t = uint64_t; | |
110 | type io_user_reference_t = uint64_t; | |
111 | type io_scalar_inband_t = array[*:16] of io_user_scalar_t; | |
112 | type io_async_ref_t = array[*:8] of io_user_reference_t; | |
113 | type io_scalar_inband64_t = array[*:16] of io_user_scalar_t; | |
114 | type io_async_ref64_t = array[*:8] of io_user_reference_t; | |
115 | #else | |
116 | type io_user_scalar_t = int; | |
117 | type io_user_reference_t = natural_t; | |
118 | type io_scalar_inband_t = array[*:16] of io_user_scalar_t; | |
119 | type io_async_ref_t = array[*:8] of io_user_reference_t; | |
120 | type io_scalar_inband64_t = array[*:16] of uint64_t; | |
121 | type io_async_ref64_t = array[*:8] of uint64_t; | |
122 | #endif // __LP64__ | |
1c79356b A |
123 | |
124 | type io_object_t = mach_port_t | |
125 | ctype: mach_port_t | |
126 | #if KERNEL_SERVER | |
127 | intran: io_object_t iokit_lookup_object_port(mach_port_t) | |
128 | outtran: mach_port_t iokit_make_object_port(io_object_t) | |
129 | destructor: iokit_remove_reference(io_object_t) | |
130 | #endif /* KERNEL_SERVER */ | |
131 | ; | |
132 | ||
133 | type io_connect_t = mach_port_t | |
134 | ctype: mach_port_t | |
135 | #if KERNEL_SERVER | |
136 | intran: io_connect_t iokit_lookup_connect_port(mach_port_t) | |
137 | outtran: mach_port_t iokit_make_connect_port(io_connect_t) | |
490019cf | 138 | destructor: iokit_remove_connect_reference(io_connect_t) |
1c79356b A |
139 | #endif /* KERNEL_SERVER */ |
140 | ; | |
141 | ||
142 | routine io_object_get_class( | |
143 | object : io_object_t; | |
144 | out className : io_name_t | |
145 | ); | |
146 | ||
147 | routine io_object_conforms_to( | |
148 | object : io_object_t; | |
149 | in className : io_name_t; | |
150 | out conforms : boolean_t | |
151 | ); | |
152 | ||
153 | routine io_iterator_next( | |
154 | iterator : io_object_t; | |
155 | out object : io_object_t | |
156 | ); | |
157 | ||
158 | routine io_iterator_reset( | |
159 | iterator : io_object_t | |
160 | ); | |
161 | ||
162 | routine io_service_get_matching_services( | |
163 | master_port : mach_port_t; | |
164 | in matching : io_string_t; | |
165 | out existing : io_object_t | |
166 | ); | |
167 | ||
0b4e3aa0 A |
168 | routine io_registry_entry_get_property( |
169 | registry_entry : io_object_t; | |
170 | in property_name : io_name_t; | |
171 | out properties : io_buf_ptr_t, physicalcopy | |
1c79356b A |
172 | ); |
173 | ||
174 | routine io_registry_create_iterator( | |
175 | master_port : mach_port_t; | |
176 | in plane : io_name_t; | |
2d21ac55 | 177 | in options : uint32_t; |
1c79356b A |
178 | out iterator : io_object_t |
179 | ); | |
180 | ||
181 | routine io_registry_iterator_enter_entry( | |
182 | iterator : io_object_t | |
183 | ); | |
184 | ||
185 | routine io_registry_iterator_exit_entry( | |
186 | iterator : io_object_t | |
187 | ); | |
188 | ||
189 | routine io_registry_entry_from_path( | |
190 | master_port : mach_port_t; | |
191 | in path : io_string_t; | |
192 | out registry_entry : io_object_t | |
193 | ); | |
194 | ||
195 | routine io_registry_entry_get_name( | |
196 | registry_entry : io_object_t; | |
197 | out name : io_name_t | |
198 | ); | |
199 | ||
200 | routine io_registry_entry_get_properties( | |
201 | registry_entry : io_object_t; | |
202 | out properties : io_buf_ptr_t, physicalcopy | |
203 | ); | |
204 | ||
0b4e3aa0 | 205 | routine io_registry_entry_get_property_bytes( |
1c79356b A |
206 | registry_entry : io_object_t; |
207 | in property_name : io_name_t; | |
208 | out data : io_struct_inband_t, CountInOut | |
209 | ); | |
210 | ||
211 | routine io_registry_entry_get_child_iterator( | |
212 | registry_entry : io_object_t; | |
213 | in plane : io_name_t; | |
214 | out iterator : io_object_t | |
215 | ); | |
216 | ||
217 | routine io_registry_entry_get_parent_iterator( | |
218 | registry_entry : io_object_t; | |
219 | in plane : io_name_t; | |
220 | out iterator : io_object_t | |
221 | ); | |
222 | ||
6d2010ae A |
223 | skip; |
224 | /* was routine io_service_open | |
1c79356b A |
225 | service : io_object_t; |
226 | in owningTask : task_t; | |
2d21ac55 | 227 | in connect_type : uint32_t; |
1c79356b A |
228 | out connection : io_connect_t |
229 | ); | |
6d2010ae | 230 | */ |
1c79356b A |
231 | |
232 | routine io_service_close( | |
233 | connection : io_connect_t | |
234 | ); | |
235 | ||
236 | routine io_connect_get_service( | |
237 | connection : io_connect_t; | |
238 | out service : io_object_t | |
239 | ); | |
240 | ||
39236c6e | 241 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
242 | routine io_connect_set_notification_port( |
243 | connection : io_connect_t; | |
2d21ac55 | 244 | in notification_type : uint32_t; |
1c79356b | 245 | in port : mach_port_make_send_t; |
2d21ac55 | 246 | in reference : uint32_t |
1c79356b A |
247 | ); |
248 | ||
249 | routine io_connect_map_memory( | |
250 | connection : io_connect_t; | |
2d21ac55 | 251 | in memory_type : uint32_t; |
1c79356b | 252 | in into_task : task_t; |
39236c6e | 253 | #if IOKIT_ALL_IPC |
b0d623f7 A |
254 | inout address : uint32_t; |
255 | inout size : uint32_t; | |
256 | #else | |
1c79356b A |
257 | inout address : vm_address_t; |
258 | inout size : vm_size_t; | |
b0d623f7 | 259 | #endif |
2d21ac55 | 260 | in flags : uint32_t |
1c79356b | 261 | ); |
2d21ac55 A |
262 | #else |
263 | skip; | |
264 | skip; | |
265 | #endif | |
1c79356b A |
266 | |
267 | routine io_connect_add_client( | |
268 | connection : io_connect_t; | |
269 | in connect_to : io_connect_t | |
270 | ); | |
271 | ||
272 | routine io_connect_set_properties( | |
273 | connection : io_connect_t; | |
274 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 275 | out result : kern_return_t |
1c79356b A |
276 | ); |
277 | ||
fe8ab488 | 278 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
279 | routine io_connect_method_scalarI_scalarO( |
280 | connection : io_connect_t; | |
2d21ac55 | 281 | in selector : uint32_t; |
1c79356b A |
282 | in input : io_scalar_inband_t; |
283 | out output : io_scalar_inband_t, CountInOut | |
284 | ); | |
285 | ||
286 | routine io_connect_method_scalarI_structureO( | |
287 | connection : io_connect_t; | |
2d21ac55 | 288 | in selector : uint32_t; |
1c79356b A |
289 | in input : io_scalar_inband_t; |
290 | out output : io_struct_inband_t, CountInOut | |
291 | ); | |
292 | ||
293 | routine io_connect_method_scalarI_structureI( | |
294 | connection : io_connect_t; | |
2d21ac55 | 295 | in selector : uint32_t; |
1c79356b A |
296 | in input : io_scalar_inband_t; |
297 | in inputStruct : io_struct_inband_t | |
298 | ); | |
299 | ||
300 | routine io_connect_method_structureI_structureO( | |
301 | connection : io_connect_t; | |
2d21ac55 | 302 | in selector : uint32_t; |
1c79356b A |
303 | in input : io_struct_inband_t; |
304 | out output : io_struct_inband_t, CountInOut | |
305 | ); | |
2d21ac55 A |
306 | #else |
307 | skip; | |
308 | skip; | |
309 | skip; | |
310 | skip; | |
311 | #endif | |
1c79356b A |
312 | |
313 | routine io_registry_entry_get_path( | |
314 | registry_entry : io_object_t; | |
315 | in plane : io_name_t; | |
316 | out path : io_string_t | |
317 | ); | |
318 | ||
319 | routine io_registry_get_root_entry( | |
320 | master_port : mach_port_t; | |
321 | out root : io_object_t | |
322 | ); | |
323 | ||
324 | routine io_registry_entry_set_properties( | |
325 | registry_entry : io_object_t; | |
326 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 327 | out result : kern_return_t |
1c79356b A |
328 | ); |
329 | ||
330 | routine io_registry_entry_in_plane( | |
331 | registry_entry : io_object_t; | |
332 | in plane : io_name_t; | |
333 | out inPlane : boolean_t | |
334 | ); | |
335 | ||
336 | routine io_object_get_retain_count( | |
337 | object : io_object_t; | |
2d21ac55 | 338 | out retainCount : uint32_t |
1c79356b A |
339 | ); |
340 | ||
341 | routine io_service_get_busy_state( | |
342 | service : io_object_t; | |
2d21ac55 | 343 | out busyState : uint32_t |
1c79356b A |
344 | ); |
345 | ||
346 | routine io_service_wait_quiet( | |
347 | service : io_object_t; | |
348 | wait_time : mach_timespec_t | |
349 | ); | |
350 | ||
351 | routine io_registry_entry_create_iterator( | |
352 | registry_entry : io_object_t; | |
353 | in plane : io_name_t; | |
2d21ac55 | 354 | in options : uint32_t; |
1c79356b A |
355 | out iterator : io_object_t |
356 | ); | |
357 | ||
358 | routine io_iterator_is_valid( | |
359 | iterator : io_object_t; | |
360 | out is_valid : boolean_t | |
361 | ); | |
362 | ||
316670eb A |
363 | skip; |
364 | /* was routine io_make_matching( | |
1c79356b | 365 | master_port : mach_port_t; |
2d21ac55 A |
366 | in of_type : uint32_t; |
367 | in options : uint32_t; | |
1c79356b A |
368 | in input : io_struct_inband_t; |
369 | out matching : io_string_t | |
370 | ); | |
316670eb | 371 | */ |
1c79356b A |
372 | |
373 | routine io_catalog_send_data( | |
374 | master_port : mach_port_t; | |
2d21ac55 | 375 | in flag : uint32_t; |
1c79356b | 376 | in inData : io_buf_ptr_t; |
2d21ac55 | 377 | out result : kern_return_t |
1c79356b A |
378 | ); |
379 | ||
380 | routine io_catalog_terminate( | |
381 | master_port : mach_port_t; | |
2d21ac55 | 382 | in flag : uint32_t; |
1c79356b A |
383 | in name : io_name_t |
384 | ); | |
385 | ||
386 | routine io_catalog_get_data( | |
387 | master_port : mach_port_t; | |
2d21ac55 | 388 | in flag : uint32_t; |
1c79356b A |
389 | out outData : io_buf_ptr_t |
390 | ); | |
391 | ||
392 | routine io_catalog_get_gen_count( | |
393 | master_port : mach_port_t; | |
2d21ac55 | 394 | out genCount : uint32_t |
1c79356b A |
395 | ); |
396 | ||
397 | routine io_catalog_module_loaded( | |
398 | master_port : mach_port_t; | |
399 | in name : io_name_t | |
400 | ); | |
401 | ||
402 | routine io_catalog_reset( | |
403 | master_port : mach_port_t; | |
2d21ac55 | 404 | in flag : uint32_t |
1c79356b A |
405 | ); |
406 | ||
407 | routine io_service_request_probe( | |
408 | service : io_object_t; | |
2d21ac55 | 409 | in options : uint32_t |
1c79356b A |
410 | ); |
411 | ||
412 | routine io_registry_entry_get_name_in_plane( | |
413 | registry_entry : io_object_t; | |
414 | in plane : io_name_t; | |
415 | out name : io_name_t | |
416 | ); | |
417 | ||
418 | routine io_service_match_property_table( | |
419 | service : io_object_t; | |
420 | in matching : io_string_t; | |
421 | out matches : boolean_t | |
422 | ); | |
423 | ||
fe8ab488 | 424 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
425 | routine io_async_method_scalarI_scalarO( |
426 | connection : io_connect_t; | |
427 | in wake_port : mach_port_make_send_t; | |
428 | in reference : io_async_ref_t; | |
2d21ac55 | 429 | in selector : uint32_t; |
1c79356b A |
430 | in input : io_scalar_inband_t; |
431 | out output : io_scalar_inband_t, CountInOut | |
432 | ); | |
1c79356b A |
433 | routine io_async_method_scalarI_structureO( |
434 | connection : io_connect_t; | |
435 | in wake_port : mach_port_make_send_t; | |
436 | in reference : io_async_ref_t; | |
2d21ac55 | 437 | in selector : uint32_t; |
1c79356b A |
438 | in input : io_scalar_inband_t; |
439 | out output : io_struct_inband_t, CountInOut | |
440 | ); | |
1c79356b A |
441 | routine io_async_method_scalarI_structureI( |
442 | connection : io_connect_t; | |
443 | in wake_port : mach_port_make_send_t; | |
444 | in reference : io_async_ref_t; | |
2d21ac55 | 445 | in selector : uint32_t; |
1c79356b A |
446 | in input : io_scalar_inband_t; |
447 | in inputStruct : io_struct_inband_t | |
448 | ); | |
1c79356b A |
449 | routine io_async_method_structureI_structureO( |
450 | connection : io_connect_t; | |
451 | in wake_port : mach_port_make_send_t; | |
452 | in reference : io_async_ref_t; | |
2d21ac55 | 453 | in selector : uint32_t; |
1c79356b A |
454 | in input : io_struct_inband_t; |
455 | out output : io_struct_inband_t, CountInOut | |
456 | ); | |
2d21ac55 A |
457 | #else |
458 | skip; | |
459 | skip; | |
460 | skip; | |
461 | skip; | |
462 | #endif | |
1c79356b | 463 | |
39236c6e | 464 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
465 | routine io_service_add_notification( |
466 | master_port : mach_port_t; | |
467 | in notification_type : io_name_t; | |
468 | in matching : io_string_t; | |
469 | in wake_port : mach_port_make_send_t; | |
470 | in reference : io_async_ref_t; | |
471 | out notification : io_object_t | |
472 | ); | |
1c79356b A |
473 | routine io_service_add_interest_notification( |
474 | service : io_object_t; | |
475 | in type_of_interest : io_name_t; | |
476 | in wake_port : mach_port_make_send_t; | |
477 | in reference : io_async_ref_t; | |
478 | out notification : io_object_t | |
2d21ac55 | 479 | ); |
1c79356b | 480 | routine io_service_acknowledge_notification( |
2d21ac55 A |
481 | service : io_object_t; |
482 | in notify_ref : natural_t; | |
483 | in response : natural_t | |
484 | ); | |
485 | #else | |
486 | skip; | |
487 | skip; | |
488 | skip; | |
489 | #endif | |
1c79356b A |
490 | |
491 | routine io_connect_get_notification_semaphore( | |
492 | connection : io_connect_t; | |
493 | in notification_type : natural_t; | |
494 | out semaphore : semaphore_t | |
495 | ); | |
496 | ||
39236c6e | 497 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
498 | routine io_connect_unmap_memory( |
499 | connection : io_connect_t; | |
2d21ac55 | 500 | in memory_type : uint32_t; |
1c79356b | 501 | in into_task : task_t; |
39236c6e | 502 | #if IOKIT_ALL_IPC |
b0d623f7 A |
503 | in address : uint32_t |
504 | #else | |
1c79356b | 505 | in address : vm_address_t |
b0d623f7 | 506 | #endif |
1c79356b | 507 | ); |
2d21ac55 A |
508 | #else |
509 | skip; | |
510 | #endif | |
1c79356b | 511 | |
0b4e3aa0 A |
512 | routine io_registry_entry_get_location_in_plane( |
513 | registry_entry : io_object_t; | |
514 | in plane : io_name_t; | |
515 | out location : io_name_t | |
516 | ); | |
517 | ||
518 | routine io_registry_entry_get_property_recursively( | |
519 | registry_entry : io_object_t; | |
520 | in plane : io_name_t; | |
521 | in property_name : io_name_t; | |
2d21ac55 | 522 | in options : uint32_t; |
0b4e3aa0 A |
523 | out properties : io_buf_ptr_t, physicalcopy |
524 | ); | |
525 | ||
55e303ae A |
526 | routine io_service_get_state( |
527 | service : io_object_t; | |
b0d623f7 A |
528 | out state : uint64_t; |
529 | out busy_state : uint32_t; | |
530 | out accumulated_busy_time : uint64_t | |
55e303ae A |
531 | ); |
532 | ||
533 | routine io_service_get_matching_services_ool( | |
534 | master_port : mach_port_t; | |
535 | in matching : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 536 | out result : kern_return_t; |
55e303ae A |
537 | out existing : io_object_t |
538 | ); | |
539 | ||
540 | routine io_service_match_property_table_ool( | |
541 | service : io_object_t; | |
542 | in matching : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 543 | out result : kern_return_t; |
55e303ae A |
544 | out matches : boolean_t |
545 | ); | |
546 | ||
39236c6e | 547 | #if IOKIT_ALL_IPC || __ILP32__ |
55e303ae A |
548 | routine io_service_add_notification_ool( |
549 | master_port : mach_port_t; | |
550 | in notification_type : io_name_t; | |
551 | in matching : io_buf_ptr_t, physicalcopy; | |
552 | in wake_port : mach_port_make_send_t; | |
553 | in reference : io_async_ref_t; | |
2d21ac55 | 554 | out result : kern_return_t; |
55e303ae A |
555 | out notification : io_object_t |
556 | ); | |
2d21ac55 A |
557 | #else |
558 | skip; | |
559 | #endif | |
55e303ae | 560 | |
91447636 A |
561 | routine io_object_get_superclass( |
562 | master_port : mach_port_t; | |
563 | in obj_name : io_name_t; | |
564 | out class_name : io_name_t | |
565 | ); | |
566 | ||
567 | routine io_object_get_bundle_identifier( | |
568 | master_port : mach_port_t; | |
569 | in obj_name : io_name_t; | |
570 | out class_name : io_name_t | |
571 | ); | |
55e303ae | 572 | |
0c530ab8 A |
573 | routine io_service_open_extended( |
574 | service : io_object_t; | |
575 | in owningTask : task_t; | |
2d21ac55 | 576 | in connect_type : uint32_t; |
0c530ab8 A |
577 | in ndr : NDR_record_t; |
578 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 579 | out result : kern_return_t; |
0c530ab8 A |
580 | out connection : io_connect_t |
581 | ); | |
582 | ||
2d21ac55 A |
583 | |
584 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
585 | ||
586 | routine io_connect_map_memory_into_task( | |
587 | connection : io_connect_t; | |
588 | in memory_type : uint32_t; | |
589 | in into_task : task_t; | |
590 | inout address : mach_vm_address_t; | |
591 | inout size : mach_vm_size_t; | |
592 | in flags : uint32_t | |
593 | ); | |
594 | ||
595 | routine io_connect_unmap_memory_from_task( | |
596 | connection : io_connect_t; | |
597 | in memory_type : uint32_t; | |
598 | in from_task : task_t; | |
599 | in address : mach_vm_address_t | |
600 | ); | |
601 | ||
602 | routine io_connect_method( | |
603 | connection : io_connect_t; | |
604 | in selector : uint32_t; | |
605 | ||
606 | in scalar_input : io_scalar_inband64_t; | |
607 | in inband_input : io_struct_inband_t; | |
608 | in ool_input : mach_vm_address_t; | |
609 | in ool_input_size : mach_vm_size_t; | |
610 | ||
2d21ac55 | 611 | out inband_output : io_struct_inband_t, CountInOut; |
6d2010ae | 612 | out scalar_output : io_scalar_inband64_t, CountInOut; |
2d21ac55 A |
613 | in ool_output : mach_vm_address_t; |
614 | inout ool_output_size : mach_vm_size_t | |
615 | ); | |
616 | ||
617 | routine io_connect_async_method( | |
618 | connection : io_connect_t; | |
619 | in wake_port : mach_port_make_send_t; | |
620 | in reference : io_async_ref64_t; | |
621 | in selector : uint32_t; | |
622 | ||
623 | in scalar_input : io_scalar_inband64_t; | |
624 | in inband_input : io_struct_inband_t; | |
625 | in ool_input : mach_vm_address_t; | |
626 | in ool_input_size : mach_vm_size_t; | |
627 | ||
2d21ac55 | 628 | out inband_output : io_struct_inband_t, CountInOut; |
6d2010ae | 629 | out scalar_output : io_scalar_inband64_t, CountInOut; |
2d21ac55 A |
630 | in ool_output : mach_vm_address_t; |
631 | inout ool_output_size : mach_vm_size_t | |
632 | ); | |
633 | ||
634 | ||
39236c6e | 635 | #if IOKIT_ALL_IPC || __LP64__ |
2d21ac55 | 636 | |
39236c6e | 637 | #if IOKIT_ALL_IPC |
2d21ac55 A |
638 | #define FUNC_NAME(name) name ## _64 |
639 | #else | |
640 | #define FUNC_NAME(name) name | |
1c79356b A |
641 | #endif |
642 | ||
2d21ac55 A |
643 | routine FUNC_NAME(io_connect_set_notification_port)( |
644 | connection : io_connect_t; | |
645 | in notification_type : uint32_t; | |
646 | in port : mach_port_make_send_t; | |
647 | in reference : io_user_reference_t | |
648 | ); | |
649 | ||
650 | routine FUNC_NAME(io_service_add_notification)( | |
651 | master_port : mach_port_t; | |
652 | in notification_type : io_name_t; | |
653 | in matching : io_string_t; | |
654 | in wake_port : mach_port_make_send_t; | |
655 | in reference : io_async_ref64_t; | |
656 | out notification : io_object_t | |
657 | ); | |
658 | ||
659 | routine FUNC_NAME(io_service_add_interest_notification)( | |
660 | service : io_object_t; | |
661 | in type_of_interest : io_name_t; | |
662 | in wake_port : mach_port_make_send_t; | |
663 | in reference : io_async_ref64_t; | |
664 | out notification : io_object_t | |
665 | ); | |
666 | ||
667 | routine FUNC_NAME(io_service_add_notification_ool)( | |
668 | master_port : mach_port_t; | |
669 | in notification_type : io_name_t; | |
670 | in matching : io_buf_ptr_t, physicalcopy; | |
671 | in wake_port : mach_port_make_send_t; | |
672 | in reference : io_async_ref64_t; | |
673 | out result : kern_return_t; | |
674 | out notification : io_object_t | |
675 | ); | |
676 | ||
0b4c1975 A |
677 | #else |
678 | ||
679 | skip; | |
680 | skip; | |
681 | skip; | |
682 | skip; | |
2d21ac55 | 683 | |
39236c6e | 684 | #endif /* IOKIT_ALL_IPC || __LP64__ */ |
2d21ac55 | 685 | |
b0d623f7 A |
686 | routine io_registry_entry_get_registry_entry_id( |
687 | registry_entry : io_object_t; | |
688 | out entry_id : uint64_t | |
689 | ); | |
690 | ||
ebb1b9f4 A |
691 | routine io_connect_method_var_output( |
692 | connection : io_connect_t; | |
693 | in selector : uint32_t; | |
694 | ||
695 | in scalar_input : io_scalar_inband64_t; | |
696 | in inband_input : io_struct_inband_t; | |
697 | in ool_input : mach_vm_address_t; | |
698 | in ool_input_size : mach_vm_size_t; | |
699 | ||
700 | out inband_output : io_struct_inband_t, CountInOut; | |
701 | out scalar_output : io_scalar_inband64_t, CountInOut; | |
702 | out var_output : io_buf_ptr_t, physicalcopy | |
703 | ); | |
704 | ||
316670eb A |
705 | routine io_service_get_matching_service( |
706 | master_port : mach_port_t; | |
707 | in matching : io_string_t; | |
708 | out service : io_object_t | |
709 | ); | |
710 | ||
711 | routine io_service_get_matching_service_ool( | |
712 | master_port : mach_port_t; | |
713 | in matching : io_buf_ptr_t, physicalcopy; | |
714 | out result : kern_return_t; | |
715 | out service : io_object_t | |
716 | ); | |
717 | ||
fe8ab488 A |
718 | routine io_service_get_authorization_id( |
719 | service : io_object_t; | |
720 | out authorization_id : uint64_t | |
721 | ); | |
722 | ||
723 | routine io_service_set_authorization_id( | |
724 | service : io_object_t; | |
725 | in authorization_id : uint64_t | |
726 | ); | |
727 | ||
728 | /* */ | |
729 | ||
730 | routine io_server_version( | |
731 | master_port : mach_port_t; | |
732 | out version : uint64_t | |
733 | ); | |
734 | ||
735 | routine io_registry_entry_get_properties_bin( | |
736 | registry_entry : io_object_t; | |
737 | out properties : io_buf_ptr_t, physicalcopy | |
738 | ); | |
739 | ||
740 | routine io_registry_entry_get_property_bin( | |
741 | registry_entry : io_object_t; | |
742 | in plane : io_name_t; | |
743 | in property_name : io_name_t; | |
744 | in options : uint32_t; | |
745 | out properties : io_buf_ptr_t, physicalcopy | |
746 | ); | |
747 | ||
748 | routine io_service_get_matching_service_bin( | |
749 | master_port : mach_port_t; | |
750 | in matching : io_struct_inband_t; | |
751 | out service : io_object_t | |
752 | ); | |
753 | ||
754 | routine io_service_get_matching_services_bin( | |
755 | master_port : mach_port_t; | |
756 | in matching : io_struct_inband_t; | |
757 | out existing : io_object_t | |
758 | ); | |
759 | ||
760 | routine io_service_match_property_table_bin( | |
761 | service : io_object_t; | |
762 | in matching : io_struct_inband_t; | |
763 | out matches : boolean_t | |
764 | ); | |
765 | ||
766 | #if IOKIT_ALL_IPC || __ILP32__ | |
767 | routine io_service_add_notification_bin( | |
768 | master_port : mach_port_t; | |
769 | in notification_type : io_name_t; | |
770 | in matching : io_struct_inband_t; | |
771 | in wake_port : mach_port_make_send_t; | |
772 | in reference : io_async_ref_t; | |
773 | out notification : io_object_t | |
774 | ); | |
775 | #else | |
776 | skip; | |
777 | #endif | |
778 | ||
779 | #if IOKIT_ALL_IPC || __LP64__ | |
780 | routine FUNC_NAME(io_service_add_notification_bin)( | |
781 | master_port : mach_port_t; | |
782 | in notification_type : io_name_t; | |
783 | in matching : io_struct_inband_t; | |
784 | in wake_port : mach_port_make_send_t; | |
785 | in reference : io_async_ref64_t; | |
786 | out notification : io_object_t | |
787 | ); | |
788 | #else | |
789 | skip; | |
790 | #endif | |
316670eb | 791 | |
3e170ce0 A |
792 | #if !IOKITSIMD |
793 | ||
794 | routine io_registry_entry_get_path_ool( | |
795 | registry_entry : io_object_t; | |
796 | in plane : io_name_t; | |
797 | out path : io_string_inband_t; | |
798 | out path_ool : io_buf_ptr_t, physicalcopy | |
799 | ); | |
800 | ||
801 | routine io_registry_entry_from_path_ool( | |
802 | master_port : mach_port_t; | |
803 | in path : io_string_inband_t; | |
804 | in path_ool : io_buf_ptr_t, physicalcopy; | |
805 | out result : kern_return_t; | |
806 | out registry_entry : io_object_t | |
807 | ); | |
808 | ||
809 | #endif | |
810 | ||
2d21ac55 | 811 | #endif /* IOKIT */ |
1c79356b | 812 | |
2d21ac55 | 813 | /* vim: set ft=c : */ |