xref: /xnu-8020.121.3/iokit/DriverKit/IOKitKeys.h (revision fdd8201d7b966f0c3ea610489d29bd841d358941)
1 /*
2  * Copyright (c) 1998-2000 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  * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
30  *
31  * Common symbol definitions for IOKit.
32  *
33  * HISTORY
34  *
35  */
36 
37 
38 #ifndef _IOKIT_IOKITKEYS_H
39 #define _IOKIT_IOKITKEYS_H
40 
41 // properties found in the registry root
42 #define kIOKitBuildVersionKey           "IOKitBuildVersion"
43 #define kIOKitDiagnosticsKey            "IOKitDiagnostics"
44 // a dictionary keyed by plane name
45 #define kIORegistryPlanesKey            "IORegistryPlanes"
46 #define kIOCatalogueKey                 "IOCatalogue"
47 
48 // registry plane names
49 #define kIOServicePlane                 "IOService"
50 #define kIOPowerPlane                   "IOPower"
51 #define kIODeviceTreePlane              "IODeviceTree"
52 #define kIOAudioPlane                   "IOAudio"
53 #define kIOFireWirePlane                "IOFireWire"
54 #define kIOUSBPlane                     "IOUSB"
55 
56 // registry ID number
57 #define kIORegistryEntryIDKey           "IORegistryEntryID"
58 // property name to get array of property names
59 #define kIORegistryEntryPropertyKeysKey "IORegistryEntryPropertyKeys"
60 
61 // IOService class name
62 #define kIOServiceClass                 "IOService"
63 
64 // IOResources class name
65 #define kIOResourcesClass               "IOResources"
66 
67 // IOService driver probing property names
68 #define kIOClassKey                     "IOClass"
69 #define kIOProbeScoreKey                "IOProbeScore"
70 #define kIOKitDebugKey                  "IOKitDebug"
71 
72 // Properties to be supported as API
73 #define kIOSupportedPropertiesKey       "IOSupportedProperties"
74 // Properties writable by dexts
75 #define kIOUserServicePropertiesKey     "IOUserServiceProperties"
76 
77 
78 // IOService matching property names
79 #define kIOProviderClassKey             "IOProviderClass"
80 #define kIONameMatchKey                 "IONameMatch"
81 #define kIOPropertyMatchKey             "IOPropertyMatch"
82 #define kIOPropertyExistsMatchKey       "IOPropertyExistsMatch"
83 #define kIOPathMatchKey                 "IOPathMatch"
84 #define kIOLocationMatchKey             "IOLocationMatch"
85 #define kIOParentMatchKey               "IOParentMatch"
86 #define kIOResourceMatchKey             "IOResourceMatch"
87 #define kIOResourceMatchedKey           "IOResourceMatched"
88 #define kIOMatchedServiceCountKey       "IOMatchedServiceCountMatch"
89 
90 #define kIONameMatchedKey               "IONameMatched"
91 
92 #define kIOMatchCategoryKey             "IOMatchCategory"
93 #define kIODefaultMatchCategoryKey      "IODefaultMatchCategory"
94 
95 #define kIOMatchedPersonalityKey        "IOMatchedPersonality"
96 #define kIORematchPersonalityKey        "IORematchPersonality"
97 #define kIORematchCountKey              "IORematchCount"
98 #define kIODEXTMatchCountKey            "IODEXTMatchCount"
99 
100 // Entitlements to check against dext process
101 // Property is an array, one or more of which may match, of:
102 //   an array of entitlement strings, all must be present
103 // Any array can be a single string.
104 #define kIOServiceDEXTEntitlementsKey   "IOServiceDEXTEntitlements"
105 
106 // Entitlement required to open dext connection
107 #define kIODriverKitEntitlementKey      "com.apple.developer.driverkit"
108 
109 // Entitlements required to open dext IOUserClient
110 // Property is an array of strings containing CFBundleIdentifiers of service being opened
111 #define kIODriverKitUserClientEntitlementsKey "com.apple.developer.driverkit.userclient-access"
112 
113 // Allows the entitled process to open a user client connection to any dext that has specific entitlements
114 // Property is an array of strings containing entitlements, one of which needs to be present
115 // in the dext providing the user client being opened
116 #define kIODriverKitRequiredEntitlementsKey "com.apple.private.driverkit.driver-access"
117 
118 // Entitlement of a dext that allows any task to open one of its IOUserClients
119 #define kIODriverKitUserClientEntitlementAllowAnyKey "com.apple.developer.driverkit.allow-any-userclient-access"
120 
121 #define kIODriverKitUserClientEntitlementAdministratorKey "com.apple.developer.driverkit.administrator"
122 
123 // Other DriverKit entitlements
124 #define kIODriverKitUSBTransportEntitlementKey "com.apple.developer.driverkit.transport.usb"
125 #define kIODriverKitHIDTransportEntitlementKey "com.apple.developer.driverkit.transport.hid"
126 #define kIODriverKitHIDFamilyDeviceEntitlementKey "com.apple.developer.driverkit.family.hid.device"
127 #define kIODriverKitHIDFamilyEventServiceEntitlementKey "com.apple.developer.driverkit.family.hid.eventservice"
128 #define kIODriverKitTransportBuiltinEntitlementKey "com.apple.developer.driverkit.builtin"
129 
130 // Entitlement required to read nvram root-only properties as non-root user
131 #define kIONVRAMReadAccessKey           "com.apple.private.iokit.nvram-read-access"
132 // Entitlement required to write nvram properties as non-root user
133 #define kIONVRAMWriteAccessKey           "com.apple.private.iokit.nvram-write-access"
134 // Entitlement required to set properties on the IOResources object as non-root user
135 #define kIOResourcesSetPropertyKey       "com.apple.private.iokit.ioresources.setproperty"
136 // Entitlement required to read/write to the system nvram region
137 #define kIONVRAMSystemAllowKey           "com.apple.private.iokit.system-nvram-allow"
138 
139 // When possible, defer matching of this driver until kextd has started.
140 #define kIOMatchDeferKey                                "IOMatchDefer"
141 
142 // Published after processor_start() has been called on all CPUs at boot time.
143 #define kIOAllCPUInitializedKey                         "IOAllCPUInitialized"
144 
145 // IOService default user client class, for loadable user clients
146 #define kIOUserClientClassKey           "IOUserClientClass"
147 
148 // key to find IOMappers
149 #define kIOMapperIDKey                          "IOMapperID"
150 
151 #ifdef XNU_KERNEL_PRIVATE
152 // Apple Kext Exclude List
153 #define kIOExcludeListBundleID                  "com.apple.driver.KextExcludeList"
154 #endif
155 
156 #define kIOUserClientCrossEndianKey             "IOUserClientCrossEndian"
157 #define kIOUserClientCrossEndianCompatibleKey   "IOUserClientCrossEndianCompatible"
158 #define kIOUserClientSharedInstanceKey          "IOUserClientSharedInstance"
159 #if KERNEL_PRIVATE
160 #define kIOUserClientMessageAppSuspendedKey     "IOUserClientMessageAppSuspended"
161 #endif
162 #define kIOUserClientDefaultLockingKey                  "IOUserClientDefaultLocking"
163 // diagnostic string describing the creating task
164 #define kIOUserClientCreatorKey         "IOUserClientCreator"
165 // the expected cdhash value of the userspace driver executable
166 #define kIOUserServerCDHashKey          "IOUserServerCDHash"
167 
168 #define kIOUserUserClientKey                    "IOUserUserClient"
169 
170 #define kIOUserServerOneProcessKey      "IOUserServerOneProcess"
171 
172 
173 // IOService notification types
174 #define kIOPublishNotification          "IOServicePublish"
175 #define kIOFirstPublishNotification     "IOServiceFirstPublish"
176 #define kIOMatchedNotification          "IOServiceMatched"
177 #define kIOFirstMatchNotification       "IOServiceFirstMatch"
178 #define kIOTerminatedNotification       "IOServiceTerminate"
179 #define kIOWillTerminateNotification    "IOServiceWillTerminate"
180 
181 // IOService interest notification types
182 #define kIOGeneralInterest              "IOGeneralInterest"
183 #define kIOBusyInterest                 "IOBusyInterest"
184 #define kIOAppPowerStateInterest        "IOAppPowerStateInterest"
185 #define kIOPriorityPowerStateInterest   "IOPriorityPowerStateInterest"
186 
187 #define kIOPlatformDeviceMessageKey     "IOPlatformDeviceMessage"
188 
189 // IOService interest notification types
190 #define kIOCFPlugInTypesKey             "IOCFPlugInTypes"
191 
192 #define kIOCompatibilityMatchKey            "IOCompatibilityMatch"
193 #define kIOCompatibilityPropertiesKey   "IOCompatibilityProperties"
194 #define kIOPathKey                                      "IOPath"
195 
196 
197 // properties found in services that implement command pooling
198 #define kIOCommandPoolSizeKey           "IOCommandPoolSize"             // (OSNumber)
199 
200 // properties found in services that implement priority
201 #define kIOMaximumPriorityCountKey      "IOMaximumPriorityCount"        // (OSNumber)
202 
203 // properties found in services that have transfer constraints
204 #define kIOMaximumBlockCountReadKey             "IOMaximumBlockCountRead"             // (OSNumber)
205 #define kIOMaximumBlockCountWriteKey            "IOMaximumBlockCountWrite"            // (OSNumber)
206 #define kIOMaximumByteCountReadKey              "IOMaximumByteCountRead"              // (OSNumber)
207 #define kIOMaximumByteCountWriteKey             "IOMaximumByteCountWrite"             // (OSNumber)
208 #define kIOMaximumSegmentCountReadKey           "IOMaximumSegmentCountRead"           // (OSNumber)
209 #define kIOMaximumSegmentCountWriteKey          "IOMaximumSegmentCountWrite"          // (OSNumber)
210 #define kIOMaximumSegmentByteCountReadKey       "IOMaximumSegmentByteCountRead"       // (OSNumber)
211 #define kIOMaximumSegmentByteCountWriteKey      "IOMaximumSegmentByteCountWrite"      // (OSNumber)
212 #define kIOMinimumSegmentAlignmentByteCountKey  "IOMinimumSegmentAlignmentByteCount"  // (OSNumber)
213 #define kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" // (OSNumber)
214 #define kIOMinimumSaturationByteCountKey        "IOMinimumSaturationByteCount"        // (OSNumber)
215 #define kIOMaximumSwapWriteKey                  "IOMaximumSwapWrite"                  // (OSNumber)
216 
217 // properties found in services that wish to describe an icon
218 //
219 // IOIcon =
220 // {
221 //     CFBundleIdentifier   = "com.example.driver.example";
222 //     IOBundleResourceFile = "example.icns";
223 // };
224 //
225 // where IOBundleResourceFile is the filename of the resource
226 
227 #define kIOIconKey               "IOIcon"               // (OSDictionary)
228 #define kIOBundleResourceFileKey "IOBundleResourceFile" // (OSString)
229 
230 #define kIOBusBadgeKey           "IOBusBadge"           // (OSDictionary)
231 #define kIODeviceIconKey         "IODeviceIcon"         // (OSDictionary)
232 
233 // property of root that describes the machine's serial number as a string
234 #define kIOPlatformSerialNumberKey      "IOPlatformSerialNumber"        // (OSString)
235 
236 // property of root that describes the machine's UUID as a string
237 #define kIOPlatformUUIDKey      "IOPlatformUUID"        // (OSString)
238 
239 // IODTNVRAM property keys
240 #define kIONVRAMBootArgsKey             "boot-args"
241 #define kIONVRAMDeletePropertyKey       "IONVRAM-DELETE-PROPERTY"
242 #define kIONVRAMSyncNowPropertyKey      "IONVRAM-SYNCNOW-PROPERTY"
243 #define kIONVRAMActivateCSRConfigPropertyKey    "IONVRAM-ARMCSR-PROPERTY"
244 #define kIODTNVRAMPanicInfoKey          "aapl,panic-info"
245 
246 // keys for complex boot information
247 #define kIOBootDeviceKey          "IOBootDevice"                // dict | array of dicts
248 #define kIOBootDevicePathKey      "IOBootDevicePath"    // arch-neutral OSString
249 #define kIOBootDeviceSizeKey      "IOBootDeviceSize"    // OSNumber of bytes
250 
251 // keys for OS Version information
252 #define kOSBuildVersionKey              "OS Build Version"
253 
254 //
255 #define kIOStateNotificationItemCreateKey                               "com.apple.iokit.statenotification.create"
256 #define kIOStateNotificationItemSetKey                                  "com.apple.iokit.statenotification.set"
257 #define kIOStateNotificationItemCopyKey                                 "com.apple.iokit.statenotification.copy"
258 
259 #define kIOStateNotificationNameKey                                             "com.apple.iokit.statenotification.name"
260 #define kIOStateNotificationEntitlementSetKey           "com.apple.iokit.statenotification.entitlement-set"
261 #define kIOStateNotificationEntitlementGetKey           "com.apple.iokit.statenotification.entitlement-get"
262 
263 //
264 #define kIOSystemStateClamshellKey      "com.apple.iokit.pm.clamshell"
265 
266 #define kIOSystemStateSleepDescriptionKey                               "com.apple.iokit.pm.sleepdescription"
267 #define kIOSystemStateSleepDescriptionReasonKey                 "com.apple.iokit.pm.sleepreason"
268 #define kIOSystemStateSleepDescriptionHibernateStateKey      "com.apple.iokit.pm.hibernatestate"
269 
270 #define kIOSystemStateHaltDescriptionKey                               "com.apple.iokit.pm.haltdescription"
271 #define kIOSystemStateHaltDescriptionHaltStateKey      "com.apple.iokit.pm.haltstate"
272 
273 #define kIOSystemStatePowerSourceDescriptionKey                               "com.apple.iokit.pm.powersourcedescription"
274 #define kIOSystemStatePowerSourceDescriptionACAttachedKey      "com.apple.iokit.pm.acattached"
275 
276 #endif /* ! _IOKIT_IOKITKEYS_H */
277