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#ifndef _IOKIT_IOKITKEYSPRIVATE_H
30#define _IOKIT_IOKITKEYSPRIVATE_H
31
32#include <IOKit/IOKitKeys.h>
33#include <libkern/OSTypes.h>
34
35// properties found in the registry root
36#define kIOConsoleLockedKey "IOConsoleLocked" /* value is OSBoolean */
37#define kIOConsoleUsersKey "IOConsoleUsers" /* value is OSArray */
38#define kIOMaximumMappedIOByteCountKey "IOMaximumMappedIOByteCount" /* value is OSNumber */
39
40// properties found in the console user dict
41#define kIOConsoleSessionAuditIDKey "kCGSSessionAuditIDKey" /* value is OSNumber */
42
43#define kIOConsoleSessionUserNameKey "kCGSSessionUserNameKey" /* value is OSString */
44#define kIOConsoleSessionUIDKey "kCGSSessionUserIDKey" /* value is OSNumber */
45#define kIOConsoleSessionConsoleSetKey "kCGSSessionConsoleSetKey" /* value is OSNumber */
46#define kIOConsoleSessionOnConsoleKey "kCGSSessionOnConsoleKey" /* value is OSBoolean */
47#define kIOConsoleSessionLoginDoneKey "kCGSessionLoginDoneKey" /* value is OSBoolean */
48#define kIOConsoleSessionSecureInputPIDKey "kCGSSessionSecureInputPID" /* value is OSNumber */
49#define kIOConsoleSessionScreenLockedTimeKey "CGSSessionScreenLockedTime" /* value is OSNumber, secs - 1970 */
50#define kIOConsoleSessionScreenIsLockedKey "CGSSessionScreenIsLocked" /* value is OSBoolean */
51
52// IOResources property
53#define kIOConsoleUsersSeedKey "IOConsoleUsersSeed" /* value is OSNumber */
54
55// IODeviceTree:chosen properties
56#define kIOProgressBackbufferKey "IOProgressBackbuffer" /* value is OSData */
57#define kIOProgressColorThemeKey "IOProgressColorTheme" /* value is OSNumber */
58#define kIOBridgeBootSessionUUIDKey "bridge-boot-session-uuid" /* value is OSData */
59
60// interest type
61#define kIOConsoleSecurityInterest "IOConsoleSecurityInterest"
62
63
64// private keys for clientHasPrivilege
65#define kIOClientPrivilegeConsoleUser "console"
66#define kIOClientPrivilegeSecureConsoleProcess "secureprocess"
67#define kIOClientPrivilegeConsoleSession "consolesession"
68
69
70// Embedded still throttles NVRAM commits via kIONVRAMSyncNowPropertyKey, but
71// some clients still need a stricter NVRAM commit contract. Please use this with
72// care.
73#define kIONVRAMForceSyncNowPropertyKey "IONVRAM-FORCESYNCNOW-PROPERTY"
74
75// GUID to address variables for the system NVRAM region
76#define kIOKitSystemGUID "40A0DDD2-77F8-4392-B4A3-1E7304206516"
77#define kIOKitSystemGUIDPrefix (kIOKitSystemGUID ":")
78// Internal only key to give access to system region on internal builds
79#define kIONVRAMSystemInternalAllowKey "com.apple.private.iokit.system-nvram-internal-allow"
80// Internal only key to give access to hidden system region variables
81#define kIONVRAMSystemHiddenAllowKey "com.apple.private.iokit.system-nvram-hidden-allow"
82
83// clientHasPrivilege security token for kIOClientPrivilegeSecureConsoleProcess
84typedef struct _IOUCProcessToken {
85 void * token;
86 UInt32 pid;
87} IOUCProcessToken;
88
89#define kIOKernelHasSafeSleep 1
90
91#define kIOPlatformSleepActionKey "IOPlatformSleepAction" /* value is OSNumber (priority) */
92#define kIOPlatformWakeActionKey "IOPlatformWakeAction" /* value is OSNumber (priority) */
93#define kIOPlatformQuiesceActionKey "IOPlatformQuiesceAction" /* value is OSNumber (priority) */
94#define kIOPlatformActiveActionKey "IOPlatformActiveAction" /* value is OSNumber (priority) */
95#define kIOPlatformHaltRestartActionKey "IOPlatformHaltRestartAction" /* value is OSNumber (priority) */
96#define kIOPlatformPanicActionKey "IOPlatformPanicAction" /* value is OSNumber (priority) */
97
98#define kIOPlatformFunctionHandlerSet "IOPlatformFunctionHandlerSet"
99
100#define kIOPlatformFunctionHandlerMaxBusDelay "IOPlatformFunctionHandlerMaxBusDelay"
101#define kIOPlatformMaxBusDelay "IOPlatformMaxBusDelay"
102
103#if defined(__i386__) || defined(__x86_64__)
104
105#define kIOPlatformFunctionHandlerMaxInterruptDelay "IOPlatformFunctionHandlerMaxInterruptDelay"
106#define kIOPlatformMaxInterruptDelay "IOPlatformMaxInterruptDelay"
107
108#endif /* defined(__i386__) || defined(__x86_64__) */
109
110enum {
111 // these flags are valid for the prepare() method only
112 kIODirectionPrepareNoZeroFill = 0x00000010,
113};
114
115enum {
116 kIOServiceTerminateNeedWillTerminate = 0x00000100,
117};
118
119#define kIOClassNameOverrideKey "IOClassNameOverride"
120
121enum {
122 kIOClassNameOverrideNone = 0x00000001,
123};
124
125#define kIOWaitQuietPanicsEntitlement "com.apple.private.security.waitquiet-panics"
126#define kIOSystemStateEntitlement "com.apple.private.iokit.systemstate"
127
128// Entitlement allows a DK driver to publish services to other dexts, using the
129// standard IOKit registerService() or DriverKit RegisterService() api.
130// Those client dexts must have an entitlement specified by the
131// kIODriverKitPublishEntitlementsKey property in the IOService being published,
132// and subscribed in the client dext with IOServiceNotificationDispatchSource.
133#define kIODriverKitAllowsPublishEntitlementsKey "com.apple.private.driverkit.allows-publish"
134// Property is an array of strings containing entitlements, one of which needs to be present
135// in the dext looking up the service with this property
136#define kIODriverKitPublishEntitlementsKey "IODriverKitPublishEntitlementsKey"
137
138enum {
139 kIOWaitQuietPanicOnFailure = 0x00000001,
140};
141#define kIOServiceBusyTimeoutExtensionsKey "IOServiceBusyTimeoutExtensions"
142
143#define kIOServiceLegacyMatchingRegistryIDKey "IOServiceLegacyMatchingRegistryID"
144
145#define kIOServiceMatchDeferredKey "IOServiceMatchDeferred"
146
147#define kIOMatchedAtBootKey "IOMatchedAtBoot"
148
149#define kIOPrimaryDriverTerminateOptionsKey "IOPrimaryDriverTerminateOptions"
150
151#define kIOServiceNotificationUserKey "IOServiceNotificationUser"
152
153#define kIOExclaveAssignedKey "exclave-assigned"
154#define kIOExclaveProxyKey "IOExclaveProxy"
155
156
157// IONVRAMSystemVariableList:
158// "one-time-boot-command" - Needed for diags customer install flows
159// "prevent-restores" - Keep for factory <rdar://problem/70476321>
160// "sep-debug-args" - Needed to simplify debug flows for SEP
161// "StartupMute" - Set by customers via nvram tool
162
163#define IONVRAMSystemVariableList "allow-root-hash-mismatch", \
164 "auto-boot", \
165 "auto-boot-halt-stage", \
166 "base-system-path", \
167 "boot-args", \
168 "boot-command", \
169 "boot-image", \
170 "bootdelay", \
171 "com.apple.System.boot-nonce", \
172 "darkboot", \
173 "emu", \
174 "one-time-boot-command", \
175 "policy-nonce-digests", \
176 "prevent-restores", \
177 "prev-lang:kbd", \
178 "root-live-fs", \
179 "sep-debug-args", \
180 "StartupMute", \
181 "SystemAudioVolume", \
182 "SystemAudioVolumeExtension", \
183 "SystemAudioVolumeSaved"
184
185
186#endif /* ! _IOKIT_IOKITKEYSPRIVATE_H */
187