]>
Commit | Line | Data |
---|---|---|
d52fe63f A |
1 | /* |
2 | * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. | |
3 | * | |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
d52fe63f | 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@ |
d52fe63f A |
27 | */ |
28 | #ifndef _IOKIT_IOPMPRIVATE_H | |
29 | #define _IOKIT_IOPMPRIVATE_H | |
30 | ||
31 | #include <IOKit/pwr_mgt/IOPM.h> | |
32 | ||
6d2010ae A |
33 | /* @constant kIOPMEventTypeIntermediateFlag |
34 | * @abstract This bit indicates the event is an intermediate event | |
35 | * which must occur within a major system power event. | |
36 | */ | |
37 | #define kIOPMEventTypeIntermediateFlag 0x10000000 | |
38 | ||
39 | /* @enum SystemEventTypes | |
40 | * @abstract Potential system events logged in the system event record. | |
41 | */ | |
42 | enum { | |
39236c6e | 43 | kIOPMEventTypeUndefined = 0, |
6d2010ae | 44 | |
fe8ab488 | 45 | /* Event types mark driver events |
6d2010ae A |
46 | */ |
47 | kIOPMEventTypeSetPowerStateImmediate = 1001, | |
48 | kIOPMEventTypeSetPowerStateDelayed = 1002, | |
49 | kIOPMEventTypePSWillChangeTo = 1003, | |
50 | kIOPMEventTypePSDidChangeTo = 1004, | |
51 | kIOPMEventTypeAppResponse = 1005, | |
52 | ||
53 | ||
54 | /* Start and stop event types bracket major | |
55 | * system power management events. | |
56 | */ | |
39236c6e A |
57 | kIOPMEventTypeSleep = 2001, |
58 | kIOPMEventTypeSleepDone = 2002, | |
59 | kIOPMEventTypeWake = 3001, | |
60 | kIOPMEventTypeWakeDone = 3002, | |
61 | kIOPMEventTypeDoze = 4001, | |
62 | kIOPMEventTypeDozeDone = 4002, | |
39236c6e A |
63 | kIOPMEventTypeUUIDSet = 6001, |
64 | kIOPMEventTypeUUIDClear = 6002, | |
6d2010ae A |
65 | |
66 | /* Intermediate events that may only occur within the bounds | |
67 | * of a major system event (between the event's initiation and its "done event".) | |
68 | * e.g. chronologically kIOPMEventTypeSleep may be followed by one or more | |
69 | * intermediate events, which then must be followed by kIOPMEventTypeSleepDone. | |
70 | * | |
71 | * The intermediate events below will always occur in a Sleep or Wake event, and may | |
72 | * or may not occur for any of the other events. | |
73 | */ | |
74 | kIOPMEventTypeAppNotificationsFinished = 501 | kIOPMEventTypeIntermediateFlag, | |
75 | kIOPMEventTypeDriverNotificationsFinished = 502 | kIOPMEventTypeIntermediateFlag, | |
76 | kIOPMEventTypeCalTimeChange = 503 | kIOPMEventTypeIntermediateFlag | |
77 | }; | |
78 | ||
39236c6e A |
79 | /***************************************************************************** |
80 | * | |
81 | * Private Root Domain general interest messages | |
82 | * | |
83 | * Check IOPM.h when adding new messages to avoid conflict. | |
84 | * | |
85 | *****************************************************************************/ | |
86 | ||
fe8ab488 | 87 | /* kIOPMMessageUserIsActiveChanged |
39236c6e A |
88 | * User became active or inactive. Message sent after the kIOPMUserIsActiveKey |
89 | * property was updated with a new value. | |
fe8ab488 | 90 | */ |
39236c6e A |
91 | #define kIOPMMessageUserIsActiveChanged \ |
92 | iokit_family_msg(sub_iokit_powermanagement, 0x400) | |
6d2010ae | 93 | |
39236c6e A |
94 | /* |
95 | * Private IOMessage notifications shared between kernel and userspace PM policy | |
96 | */ | |
97 | #define kIOPMMessageLastCallBeforeSleep \ | |
98 | iokit_family_msg(sub_iokit_powermanagement, 0x410) | |
99 | ||
100 | /* @enum SystemSleepReasons | |
6d2010ae A |
101 | * @abstract The potential causes for system sleep as logged in the system event record. |
102 | */ | |
103 | enum { | |
104 | kIOPMSleepReasonClamshell = 101, | |
105 | kIOPMSleepReasonPowerButton = 102, | |
106 | kIOPMSleepReasonSoftware = 103, | |
107 | kIOPMSleepReasonOSSwitchHibernate = 104, | |
108 | kIOPMSleepReasonIdle = 105, | |
109 | kIOPMSleepReasonLowPower = 106, | |
110 | kIOPMSleepReasonThermalEmergency = 107, | |
7ddcb079 | 111 | kIOPMSleepReasonMaintenance = 108, |
316670eb A |
112 | kIOPMSleepReasonSleepServiceExit = 109, |
113 | kIOPMSleepReasonDarkWakeThermalEmergency = 110 | |
6d2010ae A |
114 | }; |
115 | ||
116 | /* | |
117 | * Possible C-string sleep reasons found under kRootDomainSleepReasonsKey | |
118 | */ | |
119 | #define kIOPMClamshellSleepKey "Clamshell Sleep" | |
120 | #define kIOPMPowerButtonSleepKey "Power Button Sleep" | |
121 | #define kIOPMSoftwareSleepKey "Software Sleep" | |
122 | #define kIOPMOSSwitchHibernationKey "OS Switch Sleep" | |
123 | #define kIOPMIdleSleepKey "Idle Sleep" | |
124 | #define kIOPMLowPowerSleepKey "Low Power Sleep" | |
125 | #define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep" | |
7ddcb079 | 126 | #define kIOPMSleepServiceExitKey "Sleep Service Back to Sleep" |
316670eb | 127 | #define kIOPMDarkWakeThermalEmergencyKey "Dark Wake Thermal Emergency" |
6d2010ae | 128 | |
fe8ab488 A |
129 | /*! kIOPMPSRestrictedModeKey |
130 | * An IOPMPowerSource property key | |
131 | * Its property has an integer value. | |
132 | * - value = 1 when the device is in a low power state and not fully functional. | |
133 | * - value = 0, or property missing altogether, when the device is | |
134 | * not in a restricted mode power state. | |
135 | */ | |
136 | #define kIOPMPSRestrictedModeKey "RestrictedMode" | |
6d2010ae A |
137 | |
138 | #pragma mark Stray Bitfields | |
d52fe63f A |
139 | // Private power commands issued to root domain |
140 | // bits 0-7 in IOPM.h | |
141 | ||
142 | enum { | |
b0d623f7 | 143 | kIOPMSetValue = (1<<16), |
d52fe63f | 144 | // don't sleep on clamshell closure on a portable with AC connected |
b0d623f7 | 145 | kIOPMSetDesktopMode = (1<<17), |
d52fe63f | 146 | // set state of AC adaptor connected |
b0d623f7 | 147 | kIOPMSetACAdaptorConnected = (1<<18) |
d52fe63f A |
148 | }; |
149 | ||
b0d623f7 A |
150 | /*****************************************************************************/ |
151 | /*****************************************************************************/ | |
152 | ||
593a1d5f A |
153 | /* |
154 | * PM notification types | |
155 | */ | |
156 | ||
7ddcb079 A |
157 | /*! @constant kIOPMSleepServiceScheduleImmediate |
158 | * | |
159 | * Setting type used in calls to IOPMrootDomain::registerPMSettingController | |
160 | * Use this type between powerd and IOKit.framework | |
161 | * | |
162 | */ | |
163 | #define kIOPMSleepServiceScheduleImmediate "SleepServiceImmediate" | |
164 | ||
165 | /*! @constant kIOPMSettingSleepServiceScheduleImmediate | |
166 | * | |
167 | * Setting type used in calls to IOPMrootDomain::registerPMSettingController | |
168 | * Use this type between xnu and AppleRTC | |
169 | */ | |
170 | #define kIOPMSettingSleepServiceWakeCalendarKey "SleepServiceWakeCalendarKey" | |
171 | ||
fe8ab488 | 172 | /*! @constant kIOPMCalendarWakeTypes |
7ddcb079 A |
173 | * |
174 | * These are valid values for IOPM.h:IOPMCalendarStruct->selector | |
175 | */ | |
176 | enum { | |
177 | kPMCalendarTypeMaintenance = 1, | |
178 | kPMCalendarTypeSleepService = 2 | |
179 | }; | |
180 | ||
181 | ||
182 | /* @constant kIOPMStateConsoleShutdown | |
593a1d5f A |
183 | * @abstract Notification of GUI shutdown state available to kexts. |
184 | * @discussion This type can be passed as arguments to registerPMSettingController() | |
185 | * to receive callbacks. | |
186 | */ | |
187 | #define kIOPMStateConsoleShutdown "ConsoleShutdown" | |
188 | ||
189 | /* @enum ShutdownValues | |
7ddcb079 | 190 | * @abstract Potential values shared with key kIOPMStateConsoleShutdown |
593a1d5f A |
191 | */ |
192 | enum { | |
193 | /* @constant kIOPMStateConsoleShutdownNone | |
194 | * @abstract System shutdown (or restart) hasn't started; system is ON. | |
195 | * @discussion Next state: 2 | |
196 | */ | |
197 | kIOPMStateConsoleShutdownNone = 1, | |
198 | /* @constant kIOPMStateConsoleShutdownPossible | |
199 | * @abstract User has been presented with the option to shutdown or restart. Shutdown may be cancelled. | |
200 | * @discussion Next state may be: 1, 4 | |
201 | */ | |
202 | kIOPMStateConsoleShutdownPossible = 2, | |
203 | /* @constant kIOPMStateConsoleShutdownUnderway | |
204 | * @abstract Shutdown or restart is proceeding. It may still be cancelled. | |
205 | * @discussion Next state may be: 1, 4. This state is currently unused. | |
206 | */ | |
207 | kIOPMStateConsoleShutdownUnderway = 3, | |
208 | /* @constant kIOPMStateConsoleShutdownCertain | |
209 | * @abstract Shutdown is in progress and irrevocable. | |
210 | * @discussion State remains 4 until power is removed from CPU. | |
211 | */ | |
fe8ab488 A |
212 | kIOPMStateConsoleShutdownCertain = 4, |
213 | /* @constant kIOPMStateConsoleSULogoutInitiated | |
214 | Indicates that LoginWindow has initiated a software update restart. | |
215 | The next logout will not immediately lead to a shutdown. | |
216 | */ | |
217 | kIOPMStateConsoleSULogoutInitiated = 5 | |
593a1d5f A |
218 | }; |
219 | ||
7ddcb079 A |
220 | /* @constant kIOPMSettingSilentRunningKey |
221 | * @abstract Notification of silent running mode changes to kexts. | |
222 | * @discussion This key can be passed as an argument to registerPMSettingController() | |
223 | * and also identifies the type of PMSetting notification callback. | |
224 | */ | |
225 | #define kIOPMSettingSilentRunningKey "SilentRunning" | |
226 | #define kIOPMFeatureSilentRunningKey kIOPMSettingSilentRunningKey | |
227 | ||
228 | /* @enum SilentRunningFlags | |
229 | * @abstract The kIOPMSettingSilentRunningKey notification provides an OSNumber | |
230 | * object with a value described by the following flags. | |
231 | */ | |
232 | enum { | |
233 | kIOPMSilentRunningModeOn = 0x00000001 | |
234 | }; | |
235 | ||
b0d623f7 A |
236 | /*****************************************************************************/ |
237 | /*****************************************************************************/ | |
238 | ||
fe8ab488 | 239 | /* PM Statistics - event indices |
b0d623f7 A |
240 | * These are arguments to IOPMrootDomain::pmStatsRecordEvent(). |
241 | */ | |
242 | enum { | |
243 | kIOPMStatsHibernateImageWrite = 1, | |
244 | kIOPMStatsHibernateImageRead, | |
245 | kIOPMStatsDriversNotify, | |
246 | kIOPMStatsApplicationNotify, | |
247 | kIOPMStatsLateDriverAcknowledge, | |
248 | kIOPMStatsLateAppAcknowledge, | |
fe8ab488 A |
249 | |
250 | // To designate if you're specifying the start or stop end of | |
b0d623f7 A |
251 | // each of the above events, do a bitwise OR of the appropriate |
252 | // Start/Stop flag and pass the result to IOPMrootDomain to record | |
253 | // the event. | |
254 | kIOPMStatsEventStartFlag = (1 << 24), | |
255 | kIOPMStatsEventStopFlag = (1 << 25) | |
256 | }; | |
257 | ||
258 | // Keys for IOPMrootDomain registry properties | |
259 | #define kIOPMSleepStatisticsKey "SleepStatistics" | |
260 | #define kIOPMSleepStatisticsAppsKey "AppStatistics" | |
261 | ||
262 | // Application response statistics | |
263 | #define kIOPMStatsNameKey "Name" | |
264 | #define kIOPMStatsPIDKey "Pid" | |
265 | #define kIOPMStatsTimeMSKey "TimeMS" | |
266 | #define kIOPMStatsApplicationResponseTypeKey "ResponseType" | |
267 | #define kIOPMStatsMessageTypeKey "MessageType" | |
39236c6e | 268 | #define kIOPMStatsPowerCapabilityKey "PowerCaps" |
fe8ab488 A |
269 | #define kIOPMStatsSystemTransitionKey "TransitionType" |
270 | ||
b0d623f7 A |
271 | // PM Statistics: potential values for the key kIOPMStatsApplicationResponseTypeKey |
272 | // entry in the application results array. | |
273 | #define kIOPMStatsResponseTimedOut "ResponseTimedOut" | |
274 | #define kIOPMStatsResponseCancel "ResponseCancel" | |
275 | #define kIOPMStatsResponseSlow "ResponseSlow" | |
fe8ab488 A |
276 | #define kIOPMStatsResponsePrompt "ResponsePrompt" |
277 | #define kIOPMStatsDriverPSChangeSlow "DriverPSChangeSlow" | |
b0d623f7 | 278 | |
7ddcb079 A |
279 | struct PMStatsBounds{ |
280 | uint64_t start; | |
281 | uint64_t stop; | |
282 | }; | |
b0d623f7 | 283 | typedef struct { |
fe8ab488 | 284 | |
7ddcb079 A |
285 | struct PMStatsBounds hibWrite; |
286 | struct PMStatsBounds hibRead; | |
b0d623f7 A |
287 | // bounds driverNotifySleep; |
288 | // bounds driverNotifyWake; | |
289 | // bounds appNotifySleep; | |
fe8ab488 A |
290 | // bounds appNotifyWake; |
291 | // OSDictionary *tardyApps; | |
b0d623f7 A |
292 | // OSDictionary *tardyDrivers; |
293 | } PMStatsStruct; | |
294 | ||
295 | /*****************************************************************************/ | |
296 | ||
297 | /* PM RootDomain tracePoints | |
298 | * | |
299 | * In the sleep/wake process, we expect the sleep trace points to proceed | |
6d2010ae | 300 | * in increasing order. Once sleep begins with code kIOPMTracePointSleepStarted, |
b0d623f7 | 301 | * we expect sleep to continue in a monotonically increasing order of tracepoints |
6d2010ae A |
302 | * to kIOPMTracePointSystemLoginwindowPhase. After trace point SystemLoginWindowPhase, |
303 | * the system will return to kIOPMTracePointSystemUp. | |
b0d623f7 A |
304 | * |
305 | * If the trace point decreases (instead of increasing) before reaching kIOPMTracePointSystemUp, | |
306 | * that indicates that the sleep process was cancelled. The cancel reason shall be indicated | |
307 | * in the cancel tracepoint. (TBD) | |
308 | */ | |
309 | ||
310 | enum { | |
311 | /* When kTracePointSystemUp is the latest tracePoint, | |
6d2010ae A |
312 | * the system is awake. It is not asleep, sleeping, or waking. |
313 | * | |
314 | * Phase begins: At boot, at completion of wake from sleep, | |
315 | * immediately following kIOPMTracePointSystemLoginwindowPhase. | |
316 | * Phase ends: When a sleep attempt is initiated. | |
b0d623f7 A |
317 | */ |
318 | kIOPMTracePointSystemUp = 0, | |
319 | ||
6d2010ae A |
320 | /* When kIOPMTracePointSleepStarted is the latest tracePoint, |
321 | * sleep has been initiated. | |
322 | * | |
323 | * Phase begins: At initiation of system sleep (idle or forced). | |
324 | * Phase ends: PM starts to notify applications of system sleep. | |
325 | */ | |
326 | kIOPMTracePointSleepStarted = 0x10, | |
b0d623f7 | 327 | |
6d2010ae A |
328 | /* When kIOPMTracePointSleepApplications is the latest tracePoint, |
329 | * a system sleep has been initiated and PM waits for responses | |
330 | * from notified applications. | |
331 | * | |
332 | * Phase begins: Begin to asynchronously fire kIOMessageSystemWillSleep | |
333 | * notifications, and also kIOMessageCanSystemSleep for the idle sleep case. | |
334 | * Phase ends: When PM has received all application responses. | |
335 | */ | |
336 | kIOPMTracePointSleepApplications = 0x11, | |
b0d623f7 | 337 | |
6d2010ae A |
338 | /* When kIOPMTracePointSleepPriorityClients is the latest tracePoint, |
339 | * PM is notifying priority clients and in-kernel system capability | |
340 | * clients, and waiting for any asynchronous completions. | |
341 | * | |
342 | * Phase begins: Synchronous delivery of kIOMessageSystemWillSleep notifications. | |
343 | * Phase ends: All notified clients have acknowledged. | |
344 | */ | |
345 | kIOPMTracePointSleepPriorityClients = 0x12, | |
fe8ab488 | 346 | |
6d2010ae A |
347 | /* When kIOPMTracePointSleepWillChangeInterests is the latest tracePoint, |
348 | * PM is calling powerStateWillChangeTo() on interested drivers of root domain. | |
349 | * | |
350 | * Phase begins: Dispatch a callout thread to call interested drivers. | |
351 | * Phase ends: Callout thread work done, and acknowledgePowerChange() called | |
352 | * by drivers that indicated asynchronous completion. | |
b0d623f7 | 353 | */ |
6d2010ae | 354 | kIOPMTracePointSleepWillChangeInterests = 0x13, |
b0d623f7 | 355 | |
6d2010ae A |
356 | /* When kIOPMTracePointSleepPowerPlaneDrivers is the latest tracePoint, |
357 | * PM is directing power plane drivers to power off in leaf-to-root order. | |
358 | * | |
359 | * Phase begins: Root domain informs its power children that it will drop to | |
360 | * sleep state. This has a cascade effect and triggers all drivers in | |
361 | * the power plane to transition to a lower power state if necessary. | |
362 | * Phase ends: All power transitions in response to the root domain power | |
363 | * change have completed. | |
364 | */ | |
365 | kIOPMTracePointSleepPowerPlaneDrivers = 0x14, | |
fe8ab488 | 366 | |
6d2010ae A |
367 | /* When kIOPMTracePointSleepDidChangeInterests is the latest tracePoint, |
368 | * PM is calling powerStateDidChangeTo() on interested drivers of root domain. | |
369 | * | |
370 | * Phase begins: Dispatch a callout thread to call interested drivers. | |
371 | * Phase ends: Callout thread work done, and acknowledgePowerChange() called | |
372 | * by drivers that indicated asynchronous completion. | |
373 | */ | |
374 | kIOPMTracePointSleepDidChangeInterests = 0x15, | |
b0d623f7 | 375 | |
6d2010ae A |
376 | /* When kIOPMTracePointSleepCapabilityClients is the latest tracePoint, |
377 | * PM is notifying system capability clients about system sleep. | |
378 | * | |
379 | * Phase begins: Send kIOMessageSystemCapabilityChange notifications to inform | |
380 | * capability clients that system has lost all capabilities. | |
381 | * Phase ends: Finished sending notifications. | |
b0d623f7 | 382 | */ |
6d2010ae | 383 | kIOPMTracePointSleepCapabilityClients = 0x16, |
b0d623f7 | 384 | |
6d2010ae A |
385 | /* When kIOPMTracePointSleepPlatformActions is the latest tracePoint, |
386 | * PM is calling drivers that have registered a platform sleep action. | |
387 | */ | |
388 | kIOPMTracePointSleepPlatformActions = 0x17, | |
b0d623f7 | 389 | |
6d2010ae A |
390 | /* When kIOPMTracePointSleepCPUs is the latest tracePoint, |
391 | * PM is shutting down all non-boot processors. | |
392 | * | |
393 | * Phase begins: Shutdown all non-boot processors. | |
394 | * Phase ends: Reduced to only the boot processor running. | |
b0d623f7 | 395 | */ |
6d2010ae | 396 | kIOPMTracePointSleepCPUs = 0x18, |
b0d623f7 | 397 | |
6d2010ae A |
398 | /* When kIOPMTracePointSleepPlatformDriver is the latest tracePoint, |
399 | * PM is executing platform dependent code to prepare for system sleep. | |
400 | */ | |
401 | kIOPMTracePointSleepPlatformDriver = 0x19, | |
b0d623f7 | 402 | |
6d2010ae A |
403 | /* When kIOPMTracePointHibernate is the latest tracePoint, |
404 | * PM is writing the hibernate image to disk. | |
b0d623f7 | 405 | */ |
6d2010ae | 406 | kIOPMTracePointHibernate = 0x1a, |
b0d623f7 | 407 | |
6d2010ae A |
408 | /* When kIOPMTracePointSystemSleep is the latest tracePoint, |
409 | * PM has recorded the final trace point before the hardware platform | |
410 | * enters sleep state, or low level wakeup is underway - such as restoring | |
411 | * the hibernate image from disk. | |
412 | * | |
413 | * Note: If a system is asleep and then loses power, and it does not have a | |
414 | * hibernate image to restore from (e.g. hibernatemode = 0), then OS X will | |
415 | * interpret this power loss as a failure in kIOPMTracePointSystemSleep. | |
416 | * | |
417 | * Phase begins: Before the OS directs the hardware to enter sleep state. | |
418 | * Phase ends: Control returns to the OS on wake, but before recording the first | |
419 | * wake trace point. | |
420 | */ | |
421 | kIOPMTracePointSystemSleep = 0x1f, | |
b0d623f7 | 422 | |
6d2010ae A |
423 | /* When kIOPMTracePointWakePlatformDriver is the latest tracePoint, |
424 | * PM is executing platform dependent code to prepare for system wake. | |
425 | */ | |
426 | kIOPMTracePointWakePlatformDriver = 0x21, | |
427 | ||
428 | /* When kIOPMTracePointWakePlatformActions is the latest tracePoint, | |
429 | * PM is calling drivers that have registered a platform wake action. | |
430 | */ | |
431 | kIOPMTracePointWakePlatformActions = 0x22, | |
b0d623f7 | 432 | |
6d2010ae A |
433 | /* When kIOPMTracePointWakeCPUs is the latest tracePoint, |
434 | * PM is bringing all non-boot processors online. | |
435 | */ | |
436 | kIOPMTracePointWakeCPUs = 0x23, | |
437 | ||
438 | /* When kIOPMTracePointWakeWillPowerOnClients is the latest tracePoint, | |
439 | * PM is sending kIOMessageSystemWillPowerOn to both kernel clients and | |
440 | * applications. PM also notifies system capability clients about the | |
441 | * proposed capability change. | |
442 | * | |
443 | * Phase begins: Send kIOMessageSystemWillPowerOn and | |
444 | * kIOMessageSystemCapabilityChange notifications. | |
445 | * Phase ends: Finished sending notifications. | |
b0d623f7 | 446 | */ |
6d2010ae | 447 | kIOPMTracePointWakeWillPowerOnClients = 0x24, |
b0d623f7 | 448 | |
6d2010ae A |
449 | /* When kIOPMTracePointWakeWillChangeInterests is the latest tracePoint, |
450 | * PM is calling powerStateWillChangeTo() on interested drivers of root domain. | |
451 | * | |
452 | * Phase begins: Dispatch a callout thread to call interested drivers. | |
453 | * Phase ends: Callout thread work done, and acknowledgePowerChange() called | |
454 | * by drivers that indicated asynchronous completion. | |
455 | */ | |
456 | kIOPMTracePointWakeWillChangeInterests = 0x25, | |
457 | ||
458 | /* When kIOPMTracePointWakeDidChangeInterests is the latest tracePoint, | |
459 | * PM is calling powerStateDidChangeTo() on interested drivers of root domain. | |
460 | * | |
461 | * Phase begins: Dispatch a callout thread to call interested drivers. | |
462 | * Phase ends: Callout thread work done, and acknowledgePowerChange() called | |
463 | * by drivers that indicated asynchronous completion. | |
464 | */ | |
465 | kIOPMTracePointWakeDidChangeInterests = 0x26, | |
b0d623f7 | 466 | |
6d2010ae A |
467 | /* When kIOPMTracePointWakePowerPlaneDrivers is the latest tracePoint, |
468 | * PM is directing power plane drivers to power up in root-to-leaf order. | |
469 | * | |
470 | * Phase begins: Root domain informs its power children that it transitioned | |
471 | * to ON state. This has a cascade effect and triggers all drivers in | |
472 | * the power plane to re-evaluate and potentially change power state. | |
473 | * Phase ends: All power transitions in response to the root domain power | |
474 | * change have completed. | |
b0d623f7 | 475 | */ |
6d2010ae | 476 | kIOPMTracePointWakePowerPlaneDrivers = 0x27, |
b0d623f7 | 477 | |
6d2010ae A |
478 | /* When kIOPMTracePointWakeCapabilityClients is the latest tracePoint, |
479 | * PM is notifying system capability clients about system wake, and waiting | |
480 | * for any asynchronous completions. | |
481 | * | |
482 | * Phase begins: Inform capability clients that system has gained capabilities. | |
483 | * Phase ends: All notified clients have acknowledged. | |
484 | */ | |
485 | kIOPMTracePointWakeCapabilityClients = 0x28, | |
b0d623f7 | 486 | |
6d2010ae A |
487 | /* When kIOPMTracePointWakeApplications is the latest tracePoint, |
488 | * System CPU is powered, PM has powered on each driver. | |
489 | * | |
490 | * Phase begins: Send asynchronous kIOMessageSystemHasPoweredOn notifications. | |
491 | * Phase ends: Finished sending asynchronous notifications. | |
b0d623f7 | 492 | */ |
6d2010ae | 493 | kIOPMTracePointWakeApplications = 0x29, |
b0d623f7 A |
494 | |
495 | /* kIOPMTracePointSystemLoginwindowPhase | |
6d2010ae A |
496 | * This phase represents a several minute window after the system has powered on. |
497 | * Higher levels of system diagnostics are in a heightened state of alert in this phase, | |
498 | * in case any user errors occurred that we could not detect in software. | |
499 | * | |
500 | * Phase begins: After IOPMrootDomain sends kIOMessageSystemHasPoweredOn message. | |
fe8ab488 | 501 | * Phase ends: When loginwindow calls IOPMSleepWakeSetUUID(NULL) the system shall |
6d2010ae A |
502 | * be considered awake and usable. The next phase shall be kIOPMTracePointSystemUp. |
503 | */ | |
504 | kIOPMTracePointSystemLoginwindowPhase = 0x30, | |
b0d623f7 | 505 | |
6d2010ae A |
506 | /* When kIOPMTracePointDarkWakeEntry is the latest tracePoint, |
507 | * PM has started a transition from full wake to dark wake. | |
508 | * | |
509 | * Phase begins: Start transition to dark wake. | |
510 | * Phase ends: System in dark wake. Before recording kIOPMTracePointSystemUp. | |
511 | */ | |
512 | kIOPMTracePointDarkWakeEntry = 0x31, | |
513 | ||
514 | /* When kIOPMTracePointDarkWakeExit is the latest tracePoint, | |
515 | * PM has started a transition from dark wake to full wake. | |
516 | * | |
517 | * Phase begins: Start transition to full wake. | |
518 | * Phase ends: System in full wake. Before recording kIOPMTracePointSystemUp. | |
b0d623f7 | 519 | */ |
6d2010ae | 520 | kIOPMTracePointDarkWakeExit = 0x32 |
b0d623f7 A |
521 | }; |
522 | ||
523 | /*****************************************************************************/ | |
524 | ||
525 | /* | |
526 |