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 // property name to allow only the given keys present in an OSDictionary from 61 // a user space call to IORegistryEntry::setProperties (OSArray) 62 #define kIORegistryEntryAllowableSetPropertiesKey "IORegistryEntryAllowableSetProperties" 63 // property name to single thread a user space call to IORegistryEntry::setProperties (OSBoolean) 64 #define kIORegistryEntryDefaultLockingSetPropertiesKey "IORegistryEntryDefaultLockingSetProperties" 65 66 67 // IOService class name 68 #define kIOServiceClass "IOService" 69 70 // IOResources class name 71 #define kIOResourcesClass "IOResources" 72 73 // IOService driver probing property names 74 #define kIOClassKey "IOClass" 75 #define kIOProbeScoreKey "IOProbeScore" 76 #define kIOKitDebugKey "IOKitDebug" 77 78 // DriverKit class keys 79 #define kIOUserClassKey "IOUserClass" 80 #define kIOUserClassesKey "IOUserClasses" 81 82 // Properties to be supported as API 83 #define kIOSupportedPropertiesKey "IOSupportedProperties" 84 // Properties writable by dexts 85 #define kIOUserServicePropertiesKey "IOUserServiceProperties" 86 87 88 // IOService matching property names 89 #define kIOProviderClassKey "IOProviderClass" 90 #define kIONameMatchKey "IONameMatch" 91 #define kIOPropertyMatchKey "IOPropertyMatch" 92 #define kIOPropertyExistsMatchKey "IOPropertyExistsMatch" 93 #define kIOPathMatchKey "IOPathMatch" 94 #define kIOLocationMatchKey "IOLocationMatch" 95 #define kIOParentMatchKey "IOParentMatch" 96 #define kIOResourceMatchKey "IOResourceMatch" 97 #define kIOResourceMatchedKey "IOResourceMatched" 98 #define kIOMatchedServiceCountKey "IOMatchedServiceCountMatch" 99 100 #define kIONameMatchedKey "IONameMatched" 101 102 #define kIOMatchCategoryKey "IOMatchCategory" 103 #define kIODefaultMatchCategoryKey "IODefaultMatchCategory" 104 105 #define kIOMatchedPersonalityKey "IOMatchedPersonality" 106 #define kIORematchPersonalityKey "IORematchPersonality" 107 #define kIORematchCountKey "IORematchCount" 108 #define kIODEXTMatchCountKey "IODEXTMatchCount" 109 110 // Property specifying the entitlement to check against an IOUserClient's opening process 111 // kOSBooleanFalse - Allow access (no entitlements required) 112 // string - If the opening process has the named entitlement with value == boolean true, allow access 113 #define kIOUserClientEntitlementsKey "IOUserClientEntitlements" 114 115 // Entitlements to check against dext process 116 // Property is an array, one or more of which may match, of: 117 // an array of entitlement strings, all must be present 118 // Any array can be a single string. 119 #define kIOServiceDEXTEntitlementsKey "IOServiceDEXTEntitlements" 120 121 // Entitlement required to open dext connection 122 #define kIODriverKitEntitlementKey "com.apple.developer.driverkit" 123 124 // Entitlements required to open dext IOUserClient 125 // Property is an array of strings containing CFBundleIdentifiers of service being opened 126 #define kIODriverKitUserClientEntitlementsKey "com.apple.developer.driverkit.userclient-access" 127 128 // Allows the entitled process to open a user client connection to any dext that has specific entitlements 129 // Property is an array of strings containing entitlements, one of which needs to be present 130 // in the dext providing the user client being opened 131 #define kIODriverKitRequiredEntitlementsKey "com.apple.private.driverkit.driver-access" 132 133 // Specifies that this driver is used for internal tests. This opts the driver out of our policy to 134 // reboot the device if a driver crashes too often. 135 #define kIODriverKitTestDriverEntitlementKey "com.apple.private.driverkit.test-driver" 136 137 // Entitlement of a dext that allows any task to open one of its IOUserClients 138 #define kIODriverKitUserClientEntitlementAllowAnyKey "com.apple.developer.driverkit.allow-any-userclient-access" 139 140 #define kIODriverKitUserClientEntitlementAdministratorKey "com.apple.developer.driverkit.administrator" 141 142 // Entitlements for third party drivers on iOS 143 #define kIODriverKitUserClientEntitlementCommunicatesWithDriversKey "com.apple.developer.driverkit.communicates-with-drivers" 144 #define kIODriverKitUserClientEntitlementAllowThirdPartyUserClientsKey "com.apple.developer.driverkit.allow-third-party-userclients" 145 146 // Other DriverKit entitlements 147 #define kIODriverKitUSBTransportEntitlementKey "com.apple.developer.driverkit.transport.usb" 148 #define kIODriverKitHIDTransportEntitlementKey "com.apple.developer.driverkit.transport.hid" 149 #define kIODriverKitHIDFamilyDeviceEntitlementKey "com.apple.developer.driverkit.family.hid.device" 150 #define kIODriverKitHIDFamilyEventServiceEntitlementKey "com.apple.developer.driverkit.family.hid.eventservice" 151 #define kIODriverKitTransportBuiltinEntitlementKey "com.apple.developer.driverkit.builtin" 152 153 // Entitlement required to read nvram root-only properties as non-root user 154 #define kIONVRAMReadAccessKey "com.apple.private.iokit.nvram-read-access" 155 // Entitlement required to write nvram properties as non-root user 156 #define kIONVRAMWriteAccessKey "com.apple.private.iokit.nvram-write-access" 157 // Entitlement required to set properties on the IOResources object as non-root user 158 #define kIOResourcesSetPropertyKey "com.apple.private.iokit.ioresources.setproperty" 159 // Entitlement required to read/write to the system nvram region 160 #define kIONVRAMSystemAllowKey "com.apple.private.iokit.system-nvram-allow" 161 162 // When possible, defer matching of this driver until kextd has started. 163 #define kIOMatchDeferKey "IOMatchDefer" 164 165 // Published after processor_start() has been called on all CPUs at boot time. 166 #define kIOAllCPUInitializedKey "IOAllCPUInitialized" 167 168 // IOService default user client class, for loadable user clients 169 #define kIOUserClientClassKey "IOUserClientClass" 170 171 // key to find IOMappers 172 #define kIOMapperIDKey "IOMapperID" 173 174 #ifdef XNU_KERNEL_PRIVATE 175 // Apple Kext Exclude List 176 #define kIOExcludeListBundleID "com.apple.driver.KextExcludeList" 177 #endif 178 179 #define kIOUserClientCrossEndianKey "IOUserClientCrossEndian" 180 #define kIOUserClientCrossEndianCompatibleKey "IOUserClientCrossEndianCompatible" 181 #define kIOUserClientSharedInstanceKey "IOUserClientSharedInstance" 182 #if KERNEL_PRIVATE 183 #define kIOUserClientMessageAppSuspendedKey "IOUserClientMessageAppSuspended" 184 #endif 185 186 #define kIOUserClientDefaultLockingKey "IOUserClientDefaultLocking" 187 #define kIOUserClientDefaultLockingSetPropertiesKey "IOUserClientDefaultLockingSetProperties" 188 #define kIOUserClientDefaultLockingSingleThreadExternalMethodKey "IOUserClientDefaultLockingSingleThreadExternalMethod" 189 190 // diagnostic string describing the creating task 191 #define kIOUserClientCreatorKey "IOUserClientCreator" 192 // the expected cdhash value of the userspace driver executable 193 #define kIOUserServerCDHashKey "IOUserServerCDHash" 194 195 #define kIOUserUserClientKey "IOUserUserClient" 196 197 #define kIOUserServerOneProcessKey "IOUserServerOneProcess" 198 #define kIOUserServerPreserveUserspaceRebootKey "IOUserServerPreserveUserspaceReboot" 199 200 201 // IOService notification types 202 #define kIOPublishNotification "IOServicePublish" 203 #define kIOFirstPublishNotification "IOServiceFirstPublish" 204 #define kIOMatchedNotification "IOServiceMatched" 205 #define kIOFirstMatchNotification "IOServiceFirstMatch" 206 #define kIOTerminatedNotification "IOServiceTerminate" 207 #define kIOWillTerminateNotification "IOServiceWillTerminate" 208 209 // IOService interest notification types 210 #define kIOGeneralInterest "IOGeneralInterest" 211 #define kIOBusyInterest "IOBusyInterest" 212 #define kIOAppPowerStateInterest "IOAppPowerStateInterest" 213 #define kIOPriorityPowerStateInterest "IOPriorityPowerStateInterest" 214 215 #define kIOPlatformDeviceMessageKey "IOPlatformDeviceMessage" 216 217 // IOService interest notification types 218 #define kIOCFPlugInTypesKey "IOCFPlugInTypes" 219 220 #define kIOCompatibilityMatchKey "IOCompatibilityMatch" 221 #define kIOCompatibilityPropertiesKey "IOCompatibilityProperties" 222 #define kIOPathKey "IOPath" 223 224 225 // properties found in services that implement command pooling 226 #define kIOCommandPoolSizeKey "IOCommandPoolSize" // (OSNumber) 227 228 // properties found in services that implement priority 229 #define kIOMaximumPriorityCountKey "IOMaximumPriorityCount" // (OSNumber) 230 231 // properties found in services that have transfer constraints 232 #define kIOMaximumBlockCountReadKey "IOMaximumBlockCountRead" // (OSNumber) 233 #define kIOMaximumBlockCountWriteKey "IOMaximumBlockCountWrite" // (OSNumber) 234 #define kIOMaximumByteCountReadKey "IOMaximumByteCountRead" // (OSNumber) 235 #define kIOMaximumByteCountWriteKey "IOMaximumByteCountWrite" // (OSNumber) 236 #define kIOMaximumSegmentCountReadKey "IOMaximumSegmentCountRead" // (OSNumber) 237 #define kIOMaximumSegmentCountWriteKey "IOMaximumSegmentCountWrite" // (OSNumber) 238 #define kIOMaximumSegmentByteCountReadKey "IOMaximumSegmentByteCountRead" // (OSNumber) 239 #define kIOMaximumSegmentByteCountWriteKey "IOMaximumSegmentByteCountWrite" // (OSNumber) 240 #define kIOMinimumSegmentAlignmentByteCountKey "IOMinimumSegmentAlignmentByteCount" // (OSNumber) 241 #define kIOMaximumSegmentAddressableBitCountKey "IOMaximumSegmentAddressableBitCount" // (OSNumber) 242 #define kIOMinimumSaturationByteCountKey "IOMinimumSaturationByteCount" // (OSNumber) 243 #define kIOMaximumSwapWriteKey "IOMaximumSwapWrite" // (OSNumber) 244 245 // properties found in services that wish to describe an icon 246 // 247 // IOIcon = 248 // { 249 // CFBundleIdentifier = "com.example.driver.example"; 250 // IOBundleResourceFile = "example.icns"; 251 // }; 252 // 253 // where IOBundleResourceFile is the filename of the resource 254 255 #define kIOIconKey "IOIcon" // (OSDictionary) 256 #define kIOBundleResourceFileKey "IOBundleResourceFile" // (OSString) 257 258 #define kIOBusBadgeKey "IOBusBadge" // (OSDictionary) 259 #define kIODeviceIconKey "IODeviceIcon" // (OSDictionary) 260 261 // property of root that describes the machine's serial number as a string 262 #define kIOPlatformSerialNumberKey "IOPlatformSerialNumber" // (OSString) 263 264 // property of root that describes the machine's UUID as a string 265 #define kIOPlatformUUIDKey "IOPlatformUUID" // (OSString) 266 267 // IODTNVRAM property keys 268 #define kIONVRAMBootArgsKey "boot-args" 269 #define kIONVRAMDeletePropertyKey "IONVRAM-DELETE-PROPERTY" 270 #define kIONVRAMSyncNowPropertyKey "IONVRAM-SYNCNOW-PROPERTY" 271 #define kIONVRAMActivateCSRConfigPropertyKey "IONVRAM-ARMCSR-PROPERTY" 272 #define kIODTNVRAMPanicInfoKey "aapl,panic-info" 273 #define kIONVRAMDeletePropertyKeyWRet "IONVRAM-DELETEWRET-PROPERTY" 274 275 // keys for complex boot information 276 #define kIOBootDeviceKey "IOBootDevice" // dict | array of dicts 277 #define kIOBootDevicePathKey "IOBootDevicePath" // arch-neutral OSString 278 #define kIOBootDeviceSizeKey "IOBootDeviceSize" // OSNumber of bytes 279 280 // keys for OS Version information 281 #define kOSBuildVersionKey "OS Build Version" 282 283 // 284 #define kIOStateNotificationItemCreateKey "com.apple.iokit.statenotification.create" 285 #define kIOStateNotificationItemSetKey "com.apple.iokit.statenotification.set" 286 #define kIOStateNotificationItemCopyKey "com.apple.iokit.statenotification.copy" 287 288 #define kIOStateNotificationNameKey "com.apple.iokit.statenotification.name" 289 #define kIOStateNotificationEntitlementSetKey "com.apple.iokit.statenotification.entitlement-set" 290 #define kIOStateNotificationEntitlementGetKey "com.apple.iokit.statenotification.entitlement-get" 291 292 // 293 #define kIOSystemStateClamshellKey "com.apple.iokit.pm.clamshell" 294 295 #define kIOSystemStateSleepDescriptionKey "com.apple.iokit.pm.sleepdescription" 296 #define kIOSystemStateSleepDescriptionReasonKey "com.apple.iokit.pm.sleepreason" 297 #define kIOSystemStateSleepDescriptionHibernateStateKey "com.apple.iokit.pm.hibernatestate" 298 299 // Must match IOHibernatePrivate.h! 300 enum { 301 kIOSystemStateSleepDescriptionHibernateStateInactive = 0, 302 kIOSystemStateSleepDescriptionHibernateStateHibernating = 1,/* writing image */ 303 kIOSystemStateSleepDescriptionHibernateStateWakingFromHibernate = 2 /* booted and restored image */ 304 }; 305 306 #define kIOSystemStateWakeDescriptionKey "com.apple.iokit.pm.wakedescription" 307 #define kIOSystemStateWakeDescriptionWakeReasonKey "com.apple.iokit.pm.wakereason" 308 #define kIOSystemStateWakeDescriptionContinuousTimeOffsetKey "com.apple.iokit.pm.wakedescription.continuous-time-offset" 309 310 311 #define kIOSystemStateHaltDescriptionKey "com.apple.iokit.pm.haltdescription" 312 #define kIOSystemStateHaltDescriptionHaltStateKey "com.apple.iokit.pm.haltstate" 313 314 #define kIOSystemStatePowerSourceDescriptionKey "com.apple.iokit.pm.powersourcedescription" 315 #define kIOSystemStatePowerSourceDescriptionACAttachedKey "com.apple.iokit.pm.acattached" 316 317 #endif /* ! _IOKIT_IOKITKEYS_H */ 318