#define kIOPMMessageLastCallBeforeSleep \
iokit_family_msg(sub_iokit_powermanagement, 0x410)
+#define kIOPMMessageIdleSleepPreventers \
+ iokit_family_msg(sub_iokit_powermanagement, 0x420)
+
+#define kIOPMMessageSystemSleepPreventers \
+ iokit_family_msg(sub_iokit_powermanagement, 0x430)
+
/* @enum SystemSleepReasons
* @abstract The potential causes for system sleep as logged in the system event record.
*/
// Keys for IOPMrootDomain registry properties
#define kIOPMSleepStatisticsKey "SleepStatistics"
#define kIOPMSleepStatisticsAppsKey "AppStatistics"
+#define kIOPMIdleSleepPreventersKey "IdleSleepPreventers"
+#define kIOPMSystemSleepPreventersKey "SystemSleepPreventers"
// Application response statistics
#define kIOPMStatsNameKey "Name"
kIOPMSleepFactorExternalDisplay = 0x00080000ULL,
kIOPMSleepFactorNetworkKeepAliveActive = 0x00100000ULL,
kIOPMSleepFactorLocalUserActivity = 0x00200000ULL,
- kIOPMSleepFactorHibernateFailed = 0x00400000ULL
+ kIOPMSleepFactorHibernateFailed = 0x00400000ULL,
+ kIOPMSleepFactorThermalWarning = 0x00800000ULL,
+ kIOPMSleepFactorDisplayCaptured = 0x01000000ULL
};
// System Sleep Types
#define SWD_BUF_SIZE (40*PAGE_SIZE)
#define SWD_INITIAL_STACK_SIZE ((SWD_BUF_SIZE/2)-sizeof(swd_hdr))
+#define SWD_SPINDUMP_SIZE (256*1024)
+#define SWD_INITIAL_SPINDUMP_SIZE ((SWD_SPINDUMP_SIZE/2)-sizeof(swd_hdr))
+
/* Bits in swd_flags */
#define SWD_WDOG_ENABLED 0x01
#define SWD_BOOT_BY_SW_WDOG 0x02
#define SWD_LOGS_IN_MEM 0x20
/* Filenames associated with the stackshots/logs generated by the SWD */
+#define kSleepWakeStackBinFilename "/var/log/SleepWakeStacks.bin"
#define kSleepWakeStackFilename "/var/log/SleepWakeStacks.dump"
#define kSleepWakeLogFilename "/var/log/SleepWakeLog.dump"
#define kAppleOSXWatchdogStackFilename "/var/log/AppleOSXWatchdogStacks.dump"
#define kDarkWkCntChID IOREPORT_MAKEID('G','U','I','W','k','C','n','t')
#define kUserWkCntChID IOREPORT_MAKEID('D','r','k','W','k','C','n','t')
+/*
+ * kAssertDelayChID - Histogram of time elapsed before assertion after wake.
+ */
+#define kAssertDelayBcktCnt 11
+#define kAssertDelayBcktSize 3
+#define kAssertDelayChID IOREPORT_MAKEID('r','d','A','s','r','t','D','l')
+
+/*
+ * kSleepDelaysChID - Histogram of time taken to put system to sleep
+ */
+#define kSleepDelaysBcktCnt 13
+#define kSleepDelaysBcktSize 10
+#define kSleepDelaysChID IOREPORT_MAKEID('r','d','S','l','p','D','l','y')
+
+/* Sleep Options/settings */
+#define kSleepOptionDisplayCapturedModeKey "DisplayCapturedMode"
#if defined(KERNEL) && defined(__cplusplus)
#endif /* KERNEL */
+/*****************************************************************************
+ *
+ * Performance Warning
+ *
+ *****************************************************************************/
+
+/* Performance Warning Key
+ * Key for performance warning event published using IOPMrootDomain::
+ * systemPowerEventOccurred()
+ */
+#define kIOPMPerformanceWarningKey "Performance_Warning"
+
+/* Performance warning values */
+enum {
+ kIOPMPerformanceNormal = 0,
+ kIOPMPerformanceWarning = 100
+};
+
#endif /* ! _IOKIT_IOPMPRIVATE_H */