]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/device/device.defs
xnu-6153.61.1.tar.gz
[apple/xnu.git] / osfmk / device / device.defs
index 458d89540d9bd154ecc9eaabb19a5ea56e854acd..afb0bd3065611417954f2a9ffa0985a63677dc7b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -68,6 +68,10 @@ subsystem
 #endif /* KERNEL_SERVER */
                       iokit 2800;
 
+#if IOKITSIMD || KERNEL_SERVER
+#define IOKIT_ALL_IPC 1
+#endif
+
 #include <mach/std_types.defs>
 #include <mach/mach_types.defs>
 #include <mach/clock_types.defs>
@@ -88,6 +92,7 @@ type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic
 
 type io_name_t            = c_string[*:128];
 type io_string_t          = c_string[*:512];
+type io_string_inband_t   = c_string[*:4096];
 type io_struct_inband_t   = array[*:4096] of char;
 type io_buf_ptr_t        = ^array[] of MACH_MSG_TYPE_INTEGER_8;
 type NDR_record_t         = struct[8] of char;
@@ -130,7 +135,7 @@ type io_connect_t = mach_port_t
 #if    KERNEL_SERVER
                intran: io_connect_t iokit_lookup_connect_port(mach_port_t)
                outtran: mach_port_t iokit_make_connect_port(io_connect_t)
-               destructor: iokit_remove_reference(io_connect_t)
+               destructor: iokit_remove_connect_reference(io_connect_t)
 #endif /* KERNEL_SERVER */
                ;
 
@@ -233,7 +238,7 @@ routine io_connect_get_service(
        out service             : io_object_t
        );
 
-#if  KERNEL_SERVER || __ILP32__
+#if  IOKIT_ALL_IPC || __ILP32__
 routine io_connect_set_notification_port(
            connection          : io_connect_t;
        in  notification_type   : uint32_t;
@@ -245,7 +250,7 @@ routine io_connect_map_memory(
            connection          : io_connect_t;
        in  memory_type         : uint32_t;
        in  into_task           : task_t;
-#if  KERNEL_SERVER
+#if  IOKIT_ALL_IPC
        inout address           : uint32_t;
        inout size              : uint32_t;
 #else
@@ -270,7 +275,7 @@ routine io_connect_set_properties(
         out result             : kern_return_t
        );
 
-#if  KERNEL_SERVER || (__ILP32__ && !MAP_32B_METHODS)
+#if  IOKIT_ALL_IPC || __ILP32__
 routine io_connect_method_scalarI_scalarO(
            connection          : io_connect_t;
        in  selector            : uint32_t;
@@ -355,13 +360,15 @@ routine io_iterator_is_valid(
        out is_valid            : boolean_t
        );
 
-routine io_make_matching(
+skip;
+/* was routine io_make_matching(
            master_port         : mach_port_t;
        in  of_type             : uint32_t;
        in  options             : uint32_t;
        in  input               : io_struct_inband_t;
        out matching            : io_string_t
        );
+*/
 
 routine io_catalog_send_data(
            master_port         : mach_port_t;
@@ -414,7 +421,7 @@ routine io_service_match_property_table(
        out matches             : boolean_t
        );
 
-#if  KERNEL_SERVER || (__ILP32__ && !MAP_32B_ASYNC_METHODS)
+#if  IOKIT_ALL_IPC || __ILP32__
 routine io_async_method_scalarI_scalarO(
            connection          : io_connect_t;
        in  wake_port           : mach_port_make_send_t;
@@ -454,7 +461,7 @@ skip;
 skip;
 #endif
 
-#if KERNEL_SERVER || __ILP32__
+#if IOKIT_ALL_IPC || __ILP32__
 routine io_service_add_notification(
            master_port         : mach_port_t;
        in  notification_type   : io_name_t;
@@ -487,12 +494,12 @@ routine io_connect_get_notification_semaphore(
        out semaphore           : semaphore_t
        );
 
-#if KERNEL_SERVER || __ILP32__
+#if IOKIT_ALL_IPC || __ILP32__
 routine io_connect_unmap_memory(
            connection          : io_connect_t;
        in  memory_type         : uint32_t;
        in  into_task           : task_t;
-#if KERNEL_SERVER
+#if IOKIT_ALL_IPC
        in  address             : uint32_t
 #else
        in  address             : vm_address_t
@@ -537,7 +544,7 @@ routine io_service_match_property_table_ool(
        out matches             : boolean_t
        );
 
-#if KERNEL_SERVER || __ILP32__
+#if IOKIT_ALL_IPC || __ILP32__
 routine io_service_add_notification_ool(
            master_port         : mach_port_t;
        in  notification_type   : io_name_t;
@@ -625,9 +632,9 @@ routine io_connect_async_method(
        );
 
 
-#if KERNEL_SERVER || __LP64__
+#if IOKIT_ALL_IPC || __LP64__
 
-#if KERNEL_SERVER
+#if IOKIT_ALL_IPC
 #define FUNC_NAME(name) name ## _64
 #else
 #define FUNC_NAME(name) name
@@ -674,7 +681,7 @@ routine FUNC_NAME(io_service_add_notification_ool)(
     skip;
     skip;
 
-#endif /* KERNEL_SERVER || __LP64__ */
+#endif /* IOKIT_ALL_IPC || __LP64__ */
 
 routine io_registry_entry_get_registry_entry_id(
            registry_entry      : io_object_t;
@@ -695,6 +702,135 @@ routine io_connect_method_var_output(
        out var_output          : io_buf_ptr_t, physicalcopy
        );
 
+routine io_service_get_matching_service(
+           master_port         : mach_port_t;
+       in  matching            : io_string_t;
+       out service             : io_object_t
+       );
+
+routine io_service_get_matching_service_ool(
+           master_port         : mach_port_t;
+       in  matching            : io_buf_ptr_t, physicalcopy;
+        out result             : kern_return_t;
+       out service             : io_object_t
+       );
+
+routine io_service_get_authorization_id(
+           service             : io_object_t;
+       out authorization_id    : uint64_t
+       );
+
+routine io_service_set_authorization_id(
+           service             : io_object_t;
+       in  authorization_id    : uint64_t
+       );
+
+/* */
+
+routine io_server_version(
+           master_port         : mach_port_t;
+       out version             : uint64_t
+       );
+
+routine io_registry_entry_get_properties_bin(
+           registry_entry      : io_object_t;
+       out properties          : io_buf_ptr_t, physicalcopy
+       );
+
+routine io_registry_entry_get_property_bin(
+           registry_entry      : io_object_t;
+       in  plane               : io_name_t;
+       in  property_name       : io_name_t;
+       in  options             : uint32_t;
+       out properties          : io_buf_ptr_t, physicalcopy
+       );
+
+routine io_service_get_matching_service_bin(
+           master_port         : mach_port_t;
+       in  matching            : io_struct_inband_t;
+       out service             : io_object_t
+       );
+
+routine io_service_get_matching_services_bin(
+           master_port         : mach_port_t;
+       in  matching            : io_struct_inband_t;
+       out existing            : io_object_t
+       );
+
+routine io_service_match_property_table_bin(
+           service             : io_object_t;
+       in  matching            : io_struct_inband_t;
+       out matches             : boolean_t
+       );
+
+#if IOKIT_ALL_IPC || __ILP32__
+routine io_service_add_notification_bin(
+           master_port         : mach_port_t;
+       in  notification_type   : io_name_t;
+       in  matching            : io_struct_inband_t;
+       in  wake_port           : mach_port_make_send_t;
+       in  reference           : io_async_ref_t;
+       out notification        : io_object_t
+       );
+#else
+skip;
+#endif
+
+#if IOKIT_ALL_IPC || __LP64__
+routine FUNC_NAME(io_service_add_notification_bin)(
+           master_port         : mach_port_t;
+       in  notification_type   : io_name_t;
+       in  matching            : io_struct_inband_t;
+       in  wake_port           : mach_port_make_send_t;
+       in  reference           : io_async_ref64_t;
+       out notification        : io_object_t
+       );
+#else
+skip;
+#endif
+
+#if !IOKITSIMD
+
+routine io_registry_entry_get_path_ool(
+           registry_entry      : io_object_t;
+       in  plane               : io_name_t;
+       out path                : io_string_inband_t;
+       out path_ool            : io_buf_ptr_t, physicalcopy
+       );
+
+routine io_registry_entry_from_path_ool(
+           master_port         : mach_port_t;
+       in  path                : io_string_inband_t;
+       in  path_ool            : io_buf_ptr_t, physicalcopy;
+        out result             : kern_return_t;
+       out registry_entry      : io_object_t
+       );
+
+#endif
+
+routine io_device_tree_entry_exists_with_name(
+           master_port         : mach_port_t;
+       in  name                : io_name_t;
+       out exists              : boolean_t
+       );
+
+routine io_registry_entry_get_properties_bin_buf(
+           registry_entry      : io_object_t;
+       in  buf                 : mach_vm_address_t;
+       inout  bufsize          : mach_vm_size_t;
+       out properties          : io_buf_ptr_t, physicalcopy
+       );
+
+routine io_registry_entry_get_property_bin_buf(
+           registry_entry      : io_object_t;
+       in  plane               : io_name_t;
+       in  property_name       : io_name_t;
+       in  options             : uint32_t;
+       in  buf                 : mach_vm_address_t;
+       inout  bufsize          : mach_vm_size_t;
+       out properties          : io_buf_ptr_t, physicalcopy
+       );
+
 #endif /* IOKIT */
 
 /* vim: set ft=c : */