]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
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]; | |
95 | type io_struct_inband_t = array[*:4096] of char; | |
96 | type io_buf_ptr_t = ^array[] of MACH_MSG_TYPE_INTEGER_8; | |
97 | type NDR_record_t = struct[8] of char; | |
98 | ||
99 | #if KERNEL | |
100 | type io_user_scalar_t = uint64_t; | |
101 | type io_user_reference_t = uint64_t; | |
102 | type io_scalar_inband_t = array[*:16] of int; | |
b0d623f7 | 103 | // must be the same type as OSAsyncReference |
2d21ac55 A |
104 | type io_async_ref_t = array[*:8] of natural_t; |
105 | type io_scalar_inband64_t = array[*:16] of io_user_scalar_t; | |
106 | type io_async_ref64_t = array[*:8] of io_user_reference_t; | |
107 | #elif __LP64__ | |
108 | type io_user_scalar_t = uint64_t; | |
109 | type io_user_reference_t = uint64_t; | |
110 | type io_scalar_inband_t = array[*:16] of io_user_scalar_t; | |
111 | type io_async_ref_t = array[*:8] of io_user_reference_t; | |
112 | type io_scalar_inband64_t = array[*:16] of io_user_scalar_t; | |
113 | type io_async_ref64_t = array[*:8] of io_user_reference_t; | |
114 | #else | |
115 | type io_user_scalar_t = int; | |
116 | type io_user_reference_t = natural_t; | |
117 | type io_scalar_inband_t = array[*:16] of io_user_scalar_t; | |
118 | type io_async_ref_t = array[*:8] of io_user_reference_t; | |
119 | type io_scalar_inband64_t = array[*:16] of uint64_t; | |
120 | type io_async_ref64_t = array[*:8] of uint64_t; | |
121 | #endif // __LP64__ | |
1c79356b A |
122 | |
123 | type io_object_t = mach_port_t | |
124 | ctype: mach_port_t | |
125 | #if KERNEL_SERVER | |
126 | intran: io_object_t iokit_lookup_object_port(mach_port_t) | |
127 | outtran: mach_port_t iokit_make_object_port(io_object_t) | |
128 | destructor: iokit_remove_reference(io_object_t) | |
129 | #endif /* KERNEL_SERVER */ | |
130 | ; | |
131 | ||
132 | type io_connect_t = mach_port_t | |
133 | ctype: mach_port_t | |
134 | #if KERNEL_SERVER | |
135 | intran: io_connect_t iokit_lookup_connect_port(mach_port_t) | |
136 | outtran: mach_port_t iokit_make_connect_port(io_connect_t) | |
137 | destructor: iokit_remove_reference(io_connect_t) | |
138 | #endif /* KERNEL_SERVER */ | |
139 | ; | |
140 | ||
141 | routine io_object_get_class( | |
142 | object : io_object_t; | |
143 | out className : io_name_t | |
144 | ); | |
145 | ||
146 | routine io_object_conforms_to( | |
147 | object : io_object_t; | |
148 | in className : io_name_t; | |
149 | out conforms : boolean_t | |
150 | ); | |
151 | ||
152 | routine io_iterator_next( | |
153 | iterator : io_object_t; | |
154 | out object : io_object_t | |
155 | ); | |
156 | ||
157 | routine io_iterator_reset( | |
158 | iterator : io_object_t | |
159 | ); | |
160 | ||
161 | routine io_service_get_matching_services( | |
162 | master_port : mach_port_t; | |
163 | in matching : io_string_t; | |
164 | out existing : io_object_t | |
165 | ); | |
166 | ||
0b4e3aa0 A |
167 | routine io_registry_entry_get_property( |
168 | registry_entry : io_object_t; | |
169 | in property_name : io_name_t; | |
170 | out properties : io_buf_ptr_t, physicalcopy | |
1c79356b A |
171 | ); |
172 | ||
173 | routine io_registry_create_iterator( | |
174 | master_port : mach_port_t; | |
175 | in plane : io_name_t; | |
2d21ac55 | 176 | in options : uint32_t; |
1c79356b A |
177 | out iterator : io_object_t |
178 | ); | |
179 | ||
180 | routine io_registry_iterator_enter_entry( | |
181 | iterator : io_object_t | |
182 | ); | |
183 | ||
184 | routine io_registry_iterator_exit_entry( | |
185 | iterator : io_object_t | |
186 | ); | |
187 | ||
188 | routine io_registry_entry_from_path( | |
189 | master_port : mach_port_t; | |
190 | in path : io_string_t; | |
191 | out registry_entry : io_object_t | |
192 | ); | |
193 | ||
194 | routine io_registry_entry_get_name( | |
195 | registry_entry : io_object_t; | |
196 | out name : io_name_t | |
197 | ); | |
198 | ||
199 | routine io_registry_entry_get_properties( | |
200 | registry_entry : io_object_t; | |
201 | out properties : io_buf_ptr_t, physicalcopy | |
202 | ); | |
203 | ||
0b4e3aa0 | 204 | routine io_registry_entry_get_property_bytes( |
1c79356b A |
205 | registry_entry : io_object_t; |
206 | in property_name : io_name_t; | |
207 | out data : io_struct_inband_t, CountInOut | |
208 | ); | |
209 | ||
210 | routine io_registry_entry_get_child_iterator( | |
211 | registry_entry : io_object_t; | |
212 | in plane : io_name_t; | |
213 | out iterator : io_object_t | |
214 | ); | |
215 | ||
216 | routine io_registry_entry_get_parent_iterator( | |
217 | registry_entry : io_object_t; | |
218 | in plane : io_name_t; | |
219 | out iterator : io_object_t | |
220 | ); | |
221 | ||
6d2010ae A |
222 | skip; |
223 | /* was routine io_service_open | |
1c79356b A |
224 | service : io_object_t; |
225 | in owningTask : task_t; | |
2d21ac55 | 226 | in connect_type : uint32_t; |
1c79356b A |
227 | out connection : io_connect_t |
228 | ); | |
6d2010ae | 229 | */ |
1c79356b A |
230 | |
231 | routine io_service_close( | |
232 | connection : io_connect_t | |
233 | ); | |
234 | ||
235 | routine io_connect_get_service( | |
236 | connection : io_connect_t; | |
237 | out service : io_object_t | |
238 | ); | |
239 | ||
39236c6e | 240 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
241 | routine io_connect_set_notification_port( |
242 | connection : io_connect_t; | |
2d21ac55 | 243 | in notification_type : uint32_t; |
1c79356b | 244 | in port : mach_port_make_send_t; |
2d21ac55 | 245 | in reference : uint32_t |
1c79356b A |
246 | ); |
247 | ||
248 | routine io_connect_map_memory( | |
249 | connection : io_connect_t; | |
2d21ac55 | 250 | in memory_type : uint32_t; |
1c79356b | 251 | in into_task : task_t; |
39236c6e | 252 | #if IOKIT_ALL_IPC |
b0d623f7 A |
253 | inout address : uint32_t; |
254 | inout size : uint32_t; | |
255 | #else | |
1c79356b A |
256 | inout address : vm_address_t; |
257 | inout size : vm_size_t; | |
b0d623f7 | 258 | #endif |
2d21ac55 | 259 | in flags : uint32_t |
1c79356b | 260 | ); |
2d21ac55 A |
261 | #else |
262 | skip; | |
263 | skip; | |
264 | #endif | |
1c79356b A |
265 | |
266 | routine io_connect_add_client( | |
267 | connection : io_connect_t; | |
268 | in connect_to : io_connect_t | |
269 | ); | |
270 | ||
271 | routine io_connect_set_properties( | |
272 | connection : io_connect_t; | |
273 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 274 | out result : kern_return_t |
1c79356b A |
275 | ); |
276 | ||
39236c6e | 277 | #if IOKIT_ALL_IPC || (__ILP32__ && !MAP_32B_METHODS) |
1c79356b A |
278 | routine io_connect_method_scalarI_scalarO( |
279 | connection : io_connect_t; | |
2d21ac55 | 280 | in selector : uint32_t; |
1c79356b A |
281 | in input : io_scalar_inband_t; |
282 | out output : io_scalar_inband_t, CountInOut | |
283 | ); | |
284 | ||
285 | routine io_connect_method_scalarI_structureO( | |
286 | connection : io_connect_t; | |
2d21ac55 | 287 | in selector : uint32_t; |
1c79356b A |
288 | in input : io_scalar_inband_t; |
289 | out output : io_struct_inband_t, CountInOut | |
290 | ); | |
291 | ||
292 | routine io_connect_method_scalarI_structureI( | |
293 | connection : io_connect_t; | |
2d21ac55 | 294 | in selector : uint32_t; |
1c79356b A |
295 | in input : io_scalar_inband_t; |
296 | in inputStruct : io_struct_inband_t | |
297 | ); | |
298 | ||
299 | routine io_connect_method_structureI_structureO( | |
300 | connection : io_connect_t; | |
2d21ac55 | 301 | in selector : uint32_t; |
1c79356b A |
302 | in input : io_struct_inband_t; |
303 | out output : io_struct_inband_t, CountInOut | |
304 | ); | |
2d21ac55 A |
305 | #else |
306 | skip; | |
307 | skip; | |
308 | skip; | |
309 | skip; | |
310 | #endif | |
1c79356b A |
311 | |
312 | routine io_registry_entry_get_path( | |
313 | registry_entry : io_object_t; | |
314 | in plane : io_name_t; | |
315 | out path : io_string_t | |
316 | ); | |
317 | ||
318 | routine io_registry_get_root_entry( | |
319 | master_port : mach_port_t; | |
320 | out root : io_object_t | |
321 | ); | |
322 | ||
323 | routine io_registry_entry_set_properties( | |
324 | registry_entry : io_object_t; | |
325 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 326 | out result : kern_return_t |
1c79356b A |
327 | ); |
328 | ||
329 | routine io_registry_entry_in_plane( | |
330 | registry_entry : io_object_t; | |
331 | in plane : io_name_t; | |
332 | out inPlane : boolean_t | |
333 | ); | |
334 | ||
335 | routine io_object_get_retain_count( | |
336 | object : io_object_t; | |
2d21ac55 | 337 | out retainCount : uint32_t |
1c79356b A |
338 | ); |
339 | ||
340 | routine io_service_get_busy_state( | |
341 | service : io_object_t; | |
2d21ac55 | 342 | out busyState : uint32_t |
1c79356b A |
343 | ); |
344 | ||
345 | routine io_service_wait_quiet( | |
346 | service : io_object_t; | |
347 | wait_time : mach_timespec_t | |
348 | ); | |
349 | ||
350 | routine io_registry_entry_create_iterator( | |
351 | registry_entry : io_object_t; | |
352 | in plane : io_name_t; | |
2d21ac55 | 353 | in options : uint32_t; |
1c79356b A |
354 | out iterator : io_object_t |
355 | ); | |
356 | ||
357 | routine io_iterator_is_valid( | |
358 | iterator : io_object_t; | |
359 | out is_valid : boolean_t | |
360 | ); | |
361 | ||
316670eb A |
362 | skip; |
363 | /* was routine io_make_matching( | |
1c79356b | 364 | master_port : mach_port_t; |
2d21ac55 A |
365 | in of_type : uint32_t; |
366 | in options : uint32_t; | |
1c79356b A |
367 | in input : io_struct_inband_t; |
368 | out matching : io_string_t | |
369 | ); | |
316670eb | 370 | */ |
1c79356b A |
371 | |
372 | routine io_catalog_send_data( | |
373 | master_port : mach_port_t; | |
2d21ac55 | 374 | in flag : uint32_t; |
1c79356b | 375 | in inData : io_buf_ptr_t; |
2d21ac55 | 376 | out result : kern_return_t |
1c79356b A |
377 | ); |
378 | ||
379 | routine io_catalog_terminate( | |
380 | master_port : mach_port_t; | |
2d21ac55 | 381 | in flag : uint32_t; |
1c79356b A |
382 | in name : io_name_t |
383 | ); | |
384 | ||
385 | routine io_catalog_get_data( | |
386 | master_port : mach_port_t; | |
2d21ac55 | 387 | in flag : uint32_t; |
1c79356b A |
388 | out outData : io_buf_ptr_t |
389 | ); | |
390 | ||
391 | routine io_catalog_get_gen_count( | |
392 | master_port : mach_port_t; | |
2d21ac55 | 393 | out genCount : uint32_t |
1c79356b A |
394 | ); |
395 | ||
396 | routine io_catalog_module_loaded( | |
397 | master_port : mach_port_t; | |
398 | in name : io_name_t | |
399 | ); | |
400 | ||
401 | routine io_catalog_reset( | |
402 | master_port : mach_port_t; | |
2d21ac55 | 403 | in flag : uint32_t |
1c79356b A |
404 | ); |
405 | ||
406 | routine io_service_request_probe( | |
407 | service : io_object_t; | |
2d21ac55 | 408 | in options : uint32_t |
1c79356b A |
409 | ); |
410 | ||
411 | routine io_registry_entry_get_name_in_plane( | |
412 | registry_entry : io_object_t; | |
413 | in plane : io_name_t; | |
414 | out name : io_name_t | |
415 | ); | |
416 | ||
417 | routine io_service_match_property_table( | |
418 | service : io_object_t; | |
419 | in matching : io_string_t; | |
420 | out matches : boolean_t | |
421 | ); | |
422 | ||
39236c6e | 423 | #if IOKIT_ALL_IPC || (__ILP32__ && !MAP_32B_ASYNC_METHODS) |
1c79356b A |
424 | routine io_async_method_scalarI_scalarO( |
425 | connection : io_connect_t; | |
426 | in wake_port : mach_port_make_send_t; | |
427 | in reference : io_async_ref_t; | |
2d21ac55 | 428 | in selector : uint32_t; |
1c79356b A |
429 | in input : io_scalar_inband_t; |
430 | out output : io_scalar_inband_t, CountInOut | |
431 | ); | |
1c79356b A |
432 | routine io_async_method_scalarI_structureO( |
433 | connection : io_connect_t; | |
434 | in wake_port : mach_port_make_send_t; | |
435 | in reference : io_async_ref_t; | |
2d21ac55 | 436 | in selector : uint32_t; |
1c79356b A |
437 | in input : io_scalar_inband_t; |
438 | out output : io_struct_inband_t, CountInOut | |
439 | ); | |
1c79356b A |
440 | routine io_async_method_scalarI_structureI( |
441 | connection : io_connect_t; | |
442 | in wake_port : mach_port_make_send_t; | |
443 | in reference : io_async_ref_t; | |
2d21ac55 | 444 | in selector : uint32_t; |
1c79356b A |
445 | in input : io_scalar_inband_t; |
446 | in inputStruct : io_struct_inband_t | |
447 | ); | |
1c79356b A |
448 | routine io_async_method_structureI_structureO( |
449 | connection : io_connect_t; | |
450 | in wake_port : mach_port_make_send_t; | |
451 | in reference : io_async_ref_t; | |
2d21ac55 | 452 | in selector : uint32_t; |
1c79356b A |
453 | in input : io_struct_inband_t; |
454 | out output : io_struct_inband_t, CountInOut | |
455 | ); | |
2d21ac55 A |
456 | #else |
457 | skip; | |
458 | skip; | |
459 | skip; | |
460 | skip; | |
461 | #endif | |
1c79356b | 462 | |
39236c6e | 463 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
464 | routine io_service_add_notification( |
465 | master_port : mach_port_t; | |
466 | in notification_type : io_name_t; | |
467 | in matching : io_string_t; | |
468 | in wake_port : mach_port_make_send_t; | |
469 | in reference : io_async_ref_t; | |
470 | out notification : io_object_t | |
471 | ); | |
1c79356b A |
472 | routine io_service_add_interest_notification( |
473 | service : io_object_t; | |
474 | in type_of_interest : io_name_t; | |
475 | in wake_port : mach_port_make_send_t; | |
476 | in reference : io_async_ref_t; | |
477 | out notification : io_object_t | |
2d21ac55 | 478 | ); |
1c79356b | 479 | routine io_service_acknowledge_notification( |
2d21ac55 A |
480 | service : io_object_t; |
481 | in notify_ref : natural_t; | |
482 | in response : natural_t | |
483 | ); | |
484 | #else | |
485 | skip; | |
486 | skip; | |
487 | skip; | |
488 | #endif | |
1c79356b A |
489 | |
490 | routine io_connect_get_notification_semaphore( | |
491 | connection : io_connect_t; | |
492 | in notification_type : natural_t; | |
493 | out semaphore : semaphore_t | |
494 | ); | |
495 | ||
39236c6e | 496 | #if IOKIT_ALL_IPC || __ILP32__ |
1c79356b A |
497 | routine io_connect_unmap_memory( |
498 | connection : io_connect_t; | |
2d21ac55 | 499 | in memory_type : uint32_t; |
1c79356b | 500 | in into_task : task_t; |
39236c6e | 501 | #if IOKIT_ALL_IPC |
b0d623f7 A |
502 | in address : uint32_t |
503 | #else | |
1c79356b | 504 | in address : vm_address_t |
b0d623f7 | 505 | #endif |
1c79356b | 506 | ); |
2d21ac55 A |
507 | #else |
508 | skip; | |
509 | #endif | |
1c79356b | 510 | |
0b4e3aa0 A |
511 | routine io_registry_entry_get_location_in_plane( |
512 | registry_entry : io_object_t; | |
513 | in plane : io_name_t; | |
514 | out location : io_name_t | |
515 | ); | |
516 | ||
517 | routine io_registry_entry_get_property_recursively( | |
518 | registry_entry : io_object_t; | |
519 | in plane : io_name_t; | |
520 | in property_name : io_name_t; | |
2d21ac55 | 521 | in options : uint32_t; |
0b4e3aa0 A |
522 | out properties : io_buf_ptr_t, physicalcopy |
523 | ); | |
524 | ||
55e303ae A |
525 | routine io_service_get_state( |
526 | service : io_object_t; | |
b0d623f7 A |
527 | out state : uint64_t; |
528 | out busy_state : uint32_t; | |
529 | out accumulated_busy_time : uint64_t | |
55e303ae A |
530 | ); |
531 | ||
532 | routine io_service_get_matching_services_ool( | |
533 | master_port : mach_port_t; | |
534 | in matching : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 535 | out result : kern_return_t; |
55e303ae A |
536 | out existing : io_object_t |
537 | ); | |
538 | ||
539 | routine io_service_match_property_table_ool( | |
540 | service : io_object_t; | |
541 | in matching : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 542 | out result : kern_return_t; |
55e303ae A |
543 | out matches : boolean_t |
544 | ); | |
545 | ||
39236c6e | 546 | #if IOKIT_ALL_IPC || __ILP32__ |
55e303ae A |
547 | routine io_service_add_notification_ool( |
548 | master_port : mach_port_t; | |
549 | in notification_type : io_name_t; | |
550 | in matching : io_buf_ptr_t, physicalcopy; | |
551 | in wake_port : mach_port_make_send_t; | |
552 | in reference : io_async_ref_t; | |
2d21ac55 | 553 | out result : kern_return_t; |
55e303ae A |
554 | out notification : io_object_t |
555 | ); | |
2d21ac55 A |
556 | #else |
557 | skip; | |
558 | #endif | |
55e303ae | 559 | |
91447636 A |
560 | routine io_object_get_superclass( |
561 | master_port : mach_port_t; | |
562 | in obj_name : io_name_t; | |
563 | out class_name : io_name_t | |
564 | ); | |
565 | ||
566 | routine io_object_get_bundle_identifier( | |
567 | master_port : mach_port_t; | |
568 | in obj_name : io_name_t; | |
569 | out class_name : io_name_t | |
570 | ); | |
55e303ae | 571 | |
0c530ab8 A |
572 | routine io_service_open_extended( |
573 | service : io_object_t; | |
574 | in owningTask : task_t; | |
2d21ac55 | 575 | in connect_type : uint32_t; |
0c530ab8 A |
576 | in ndr : NDR_record_t; |
577 | in properties : io_buf_ptr_t, physicalcopy; | |
2d21ac55 | 578 | out result : kern_return_t; |
0c530ab8 A |
579 | out connection : io_connect_t |
580 | ); | |
581 | ||
2d21ac55 A |
582 | |
583 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
584 | ||
585 | routine io_connect_map_memory_into_task( | |
586 | connection : io_connect_t; | |
587 | in memory_type : uint32_t; | |
588 | in into_task : task_t; | |
589 | inout address : mach_vm_address_t; | |
590 | inout size : mach_vm_size_t; | |
591 | in flags : uint32_t | |
592 | ); | |
593 | ||
594 | routine io_connect_unmap_memory_from_task( | |
595 | connection : io_connect_t; | |
596 | in memory_type : uint32_t; | |
597 | in from_task : task_t; | |
598 | in address : mach_vm_address_t | |
599 | ); | |
600 | ||
601 | routine io_connect_method( | |
602 | connection : io_connect_t; | |
603 | in selector : uint32_t; | |
604 | ||
605 | in scalar_input : io_scalar_inband64_t; | |
606 | in inband_input : io_struct_inband_t; | |
607 | in ool_input : mach_vm_address_t; | |
608 | in ool_input_size : mach_vm_size_t; | |
609 | ||
2d21ac55 | 610 | out inband_output : io_struct_inband_t, CountInOut; |
6d2010ae | 611 | out scalar_output : io_scalar_inband64_t, CountInOut; |
2d21ac55 A |
612 | in ool_output : mach_vm_address_t; |
613 | inout ool_output_size : mach_vm_size_t | |
614 | ); | |
615 | ||
616 | routine io_connect_async_method( | |
617 | connection : io_connect_t; | |
618 | in wake_port : mach_port_make_send_t; | |
619 | in reference : io_async_ref64_t; | |
620 | in selector : uint32_t; | |
621 | ||
622 | in scalar_input : io_scalar_inband64_t; | |
623 | in inband_input : io_struct_inband_t; | |
624 | in ool_input : mach_vm_address_t; | |
625 | in ool_input_size : mach_vm_size_t; | |
626 | ||
2d21ac55 | 627 | out inband_output : io_struct_inband_t, CountInOut; |
6d2010ae | 628 | out scalar_output : io_scalar_inband64_t, CountInOut; |
2d21ac55 A |
629 | in ool_output : mach_vm_address_t; |
630 | inout ool_output_size : mach_vm_size_t | |
631 | ); | |
632 | ||
633 | ||
39236c6e | 634 | #if IOKIT_ALL_IPC || __LP64__ |
2d21ac55 | 635 | |
39236c6e | 636 | #if IOKIT_ALL_IPC |
2d21ac55 A |
637 | #define FUNC_NAME(name) name ## _64 |
638 | #else | |
639 | #define FUNC_NAME(name) name | |
1c79356b A |
640 | #endif |
641 | ||
2d21ac55 A |
642 | routine FUNC_NAME(io_connect_set_notification_port)( |
643 | connection : io_connect_t; | |
644 | in notification_type : uint32_t; | |
645 | in port : mach_port_make_send_t; | |
646 | in reference : io_user_reference_t | |
647 | ); | |
648 | ||
649 | routine FUNC_NAME(io_service_add_notification)( | |
650 | master_port : mach_port_t; | |
651 | in notification_type : io_name_t; | |
652 | in matching : io_string_t; | |
653 | in wake_port : mach_port_make_send_t; | |
654 | in reference : io_async_ref64_t; | |
655 | out notification : io_object_t | |
656 | ); | |
657 | ||
658 | routine FUNC_NAME(io_service_add_interest_notification)( | |
659 | service : io_object_t; | |
660 | in type_of_interest : io_name_t; | |
661 | in wake_port : mach_port_make_send_t; | |
662 | in reference : io_async_ref64_t; | |
663 | out notification : io_object_t | |
664 | ); | |
665 | ||
666 | routine FUNC_NAME(io_service_add_notification_ool)( | |
667 | master_port : mach_port_t; | |
668 | in notification_type : io_name_t; | |
669 | in matching : io_buf_ptr_t, physicalcopy; | |
670 | in wake_port : mach_port_make_send_t; | |
671 | in reference : io_async_ref64_t; | |
672 | out result : kern_return_t; | |
673 | out notification : io_object_t | |
674 | ); | |
675 | ||
0b4c1975 A |
676 | #else |
677 | ||
678 | skip; | |
679 | skip; | |
680 | skip; | |
681 | skip; | |
2d21ac55 | 682 | |
39236c6e | 683 | #endif /* IOKIT_ALL_IPC || __LP64__ */ |
2d21ac55 | 684 | |
b0d623f7 A |
685 | routine io_registry_entry_get_registry_entry_id( |
686 | registry_entry : io_object_t; | |
687 | out entry_id : uint64_t | |
688 | ); | |
689 | ||
ebb1b9f4 A |
690 | routine io_connect_method_var_output( |
691 | connection : io_connect_t; | |
692 | in selector : uint32_t; | |
693 | ||
694 | in scalar_input : io_scalar_inband64_t; | |
695 | in inband_input : io_struct_inband_t; | |
696 | in ool_input : mach_vm_address_t; | |
697 | in ool_input_size : mach_vm_size_t; | |
698 | ||
699 | out inband_output : io_struct_inband_t, CountInOut; | |
700 | out scalar_output : io_scalar_inband64_t, CountInOut; | |
701 | out var_output : io_buf_ptr_t, physicalcopy | |
702 | ); | |
703 | ||
316670eb A |
704 | routine io_service_get_matching_service( |
705 | master_port : mach_port_t; | |
706 | in matching : io_string_t; | |
707 | out service : io_object_t | |
708 | ); | |
709 | ||
710 | routine io_service_get_matching_service_ool( | |
711 | master_port : mach_port_t; | |
712 | in matching : io_buf_ptr_t, physicalcopy; | |
713 | out result : kern_return_t; | |
714 | out service : io_object_t | |
715 | ); | |
716 | ||
717 | ||
2d21ac55 | 718 | #endif /* IOKIT */ |
1c79356b | 719 | |
2d21ac55 | 720 | /* vim: set ft=c : */ |