]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/pwr_mgt/IOPMlog.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / IOPMlog.h
index 401197aeb076c1bc339a04ec661c45ce2c36561c..1ad911a5a43bb6964cece2ad1691868c407ce71c 100644 (file)
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
-#define PMlogSetParent                 1
-#define PMlogAddChild                  2
-#define PMlogRemoveChild                       3
-#define PMlogControllingDriver         4
-#define PMlogControllingDriverErr1             5       /* bad power state array version */
-#define PMlogControllingDriverErr2             6       /* too many power states */
-#define PMlogControllingDriverErr3             7       /* not a real IOPMDriver */
-#define PMlogControllingDriverErr4             8       /* power state change in progress */
-#define PMlogInterestedDriver          9
-#define PMlogAcknowledgeErr1           10      /* unknown entity called acknowledgePowerChange */
-#define PMlogChildAcknowledge          11
-#define PMlogDriverAcknowledge         12      /* interested driver acknowledges */
-#define PMlogAcknowledgeErr2           13      /* object has already acked */
-#define PMlogAcknowledgeErr3           14      /* not expecting any acks */
-#define PMlogAcknowledgeErr4           15      /* not expecting acknowledgeSetPowerState */
-#define PMlogDriverAcknowledgeSet              16      /* controlling driver acknowledges */
-#define PMlogWillChange                        17
-#define PMlogDidChange                 18
-#define PMlogRequestDomain             19
-#define PMlogMakeUsable                        20
-#define PMlogChangeStateTo             21
-#define PMlogChangeStateToPriv         22
-#define PMlogSetAggressiveness         23
-#define PMlogCriticalTemp                      24
-#define PMlogOverrideOn                        25
-#define PMlogOverrideOff                       26
-#define PMlogEnqueueErr                        27      /* change queue overflow */
-#define PMlogCollapseQueue                     28
-#define PMlogChangeDone                        29
-#define PMlogCtrlDriverTardy           30      /* controlling driver didn't acknowledge */
-#define PMlogIntDriverTardy                    31      /* interested driver didn't acknowledge */
-#define PMlogStartAckTimer                     32
-#define PMlogStartParentChange         33
-#define PMlogAmendParentChange         34
-#define PMlogStartDeviceChange         35
-#define PMlogRequestDenied                     36      /* parent denied domain state change request */
-#define PMlogControllingDriverErr5             37      /* zero power states or we already have a driver with more power states */
-#define PMlogProgramHardware           38
-#define PMlogInformDriverPreChange     39
-#define PMlogInformDriverPostChange    40
-#define PMlogRemoveDriver                      41
-#define PMsetIdleTimerPeriod           42
-#define PMlogSystemWake                        43
-#define PMlogAcknowledgeErr5           44
-#define PMlogClientAcknowledge         45
-#define PMlogClientTardy               46              /* application or kernel client didn't acknowledge */
-#define PMlogClientCancel              47
+enum PMLogEnum {
+    kPMLogSetParent = 1,               //  1   0x05100004
+    kPMLogAddChild,                    //  2   0x05100008
+    kPMLogRemoveChild,                 //  3   0x0510000c
+    kPMLogControllingDriver,           //  4   0x05100010
+    kPMLogControllingDriverErr1,       //  5   0x05100014 - bad power state array version
+    kPMLogControllingDriverErr2,       //  6   0x05100018 - too many power states
+    kPMLogControllingDriverErr3,       //  7   0x0510001c - not a real IOPMDriver
+    kPMLogControllingDriverErr4,       //  8   0x05100020 - power state change in progress
+    kPMLogInterestedDriver,            //  9   0x05100024
+    kPMLogAcknowledgeErr1,             // 10   0x05100028 - unknown entity called acknowledgePowerChange
+    kPMLogChildAcknowledge,            // 11   0x0510002c
+    kPMLogDriverAcknowledge,           // 12   0x05100030 - interested driver acknowledges
+    kPMLogAcknowledgeErr2,             // 13   0x05100034 - object has already acked
+    kPMLogAcknowledgeErr3,             // 14   0x05100038 - not expecting any acks
+    kPMLogAcknowledgeErr4,             // 15   0x0510003c - not expecting acknowledgeSetPowerState
+    kPMLogDriverAcknowledgeSet,                // 16   0x05100040 - controlling driver acknowledges
+    kPMLogWillChange,                  // 17   0x05100044
+    kPMLogDidChange,                   // 18   0x05100048
+    kPMLogRequestDomain,               // 19   0x0510004c
+    kPMLogMakeUsable,                  // 20   0x05100050
+    kPMLogChangeStateTo,               // 21   0x05100054
+    kPMLogChangeStateToPriv,           // 22   0x05100058
+    kPMLogSetAggressiveness,           // 23   0x0510005c
+    kPMLogCriticalTemp,                        // 24   0x05100060
+    kPMLogOverrideOn,                  // 25   0x05100064
+    kPMLogOverrideOff,                 // 26   0x05100068
+    kPMLogEnqueueErr,                  // 27   0x0510006c - change queue overflow
+    kPMLogCollapseQueue,               // 28   0x05100070
+    kPMLogChangeDone,                  // 29   0x05100074
+    kPMLogCtrlDriverTardy,             // 30   0x05100078 - controlling driver didn't acknowledge
+    kPMLogIntDriverTardy,              // 31   0x0510007c - interested driver didn't acknowledge
+    kPMLogStartAckTimer,               // 32   0x05100080
+    kPMLogStartParentChange,           // 33   0x05100084
+    kPMLogAmendParentChange,           // 34   0x05100088
+    kPMLogStartDeviceChange,           // 35   0x0510008c
+    kPMLogRequestDenied,               // 36   0x05100090 - parent denied domain state change request
+    kPMLogControllingDriverErr5,       // 37   0x05100094 - zero power states or we already have a driver with more power states
+    kPMLogProgramHardware,             // 38   0x05100098
+    kPMLogInformDriverPreChange,       // 39   0x0510009c
+    kPMLogInformDriverPostChange,      // 40   0x051000a0
+    kPMLogRemoveDriver,                        // 41   0x051000a4
+    kPMLogSetIdleTimerPeriod,          // 42   0x051000a8
+    kPMLogSystemWake,                  // 43   0x051000ac
+    kPMLogAcknowledgeErr5,             // 44   0x051000b0
+    kPMLogClientAcknowledge,           // 45   0x051000b4
+    kPMLogClientTardy,                 // 46   0x051000b8 - application didn't acknowledge
+    kPMLogClientCancel,                        // 47   0x051000bc
+    kPMLogClientNotify,                        // 48   0x051000c0 - client sent a notification
+    kPMLogAppNotify,                   // 49   0x051000c4 - application sent a notification
+    kIOPMlogLastEvent
+};
+
+// Deprecated Power Management Logging Constants
+#define PMlogSetParent                 kPMLogSetParent
+#define PMlogAddChild                  kPMLogAddChild
+#define PMlogRemoveChild               kPMLogRemoveChild
+#define PMlogControllingDriver         kPMLogControllingDriver
+#define PMlogControllingDriverErr1     kPMLogControllingDriverErr1
+#define PMlogControllingDriverErr2     kPMLogControllingDriverErr2
+#define PMlogControllingDriverErr3     kPMLogControllingDriverErr3
+#define PMlogControllingDriverErr4     kPMLogControllingDriverErr4
+#define PMlogInterestedDriver          kPMLogInterestedDriver
+#define PMlogAcknowledgeErr1           kPMLogAcknowledgeErr1
+#define PMlogChildAcknowledge          kPMLogChildAcknowledge
+#define PMlogDriverAcknowledge         kPMLogDriverAcknowledge
+#define PMlogAcknowledgeErr2           kPMLogAcknowledgeErr2
+#define PMlogAcknowledgeErr3           kPMLogAcknowledgeErr3
+#define PMlogAcknowledgeErr4           kPMLogAcknowledgeErr4
+#define PMlogDriverAcknowledgeSet      kPMLogDriverAcknowledgeSet
+#define PMlogWillChange                        kPMLogWillChange
+#define PMlogDidChange                 kPMLogDidChange
+#define PMlogRequestDomain             kPMLogRequestDomain
+#define PMlogMakeUsable                        kPMLogMakeUsable
+#define PMlogChangeStateTo             kPMLogChangeStateTo
+#define PMlogChangeStateToPriv         kPMLogChangeStateToPriv
+#define PMlogSetAggressiveness         kPMLogSetAggressiveness
+#define PMlogCriticalTemp              kPMLogCriticalTemp
+#define PMlogOverrideOn                        kPMLogOverrideOn
+#define PMlogOverrideOff               kPMLogOverrideOff
+#define PMlogEnqueueErr                        kPMLogEnqueueErr
+#define PMlogCollapseQueue             kPMLogCollapseQueue
+#define PMlogChangeDone                        kPMLogChangeDone
+#define PMlogCtrlDriverTardy           kPMLogCtrlDriverTardy
+#define PMlogIntDriverTardy            kPMLogIntDriverTardy
+#define PMlogStartAckTimer             kPMLogStartAckTimer
+#define PMlogStartParentChange         kPMLogStartParentChange
+#define PMlogAmendParentChange         kPMLogAmendParentChange
+#define PMlogStartDeviceChange         kPMLogStartDeviceChange
+#define PMlogRequestDenied             kPMLogRequestDenied
+#define PMlogControllingDriverErr5     kPMLogControllingDriverErr5
+#define PMlogProgramHardware           kPMLogProgramHardware
+#define PMlogInformDriverPreChange     kPMLogInformDriverPreChange
+#define PMlogInformDriverPostChange    kPMLogInformDriverPostChange
+#define PMlogRemoveDriver              kPMLogRemoveDriver
+#define PMsetIdleTimerPeriod           kPMLogSetIdleTimerPeriod
+#define PMlogSystemWake                        kPMLogSystemWake
+#define PMlogAcknowledgeErr5           kPMLogAcknowledgeErr5
+#define PMlogClientAcknowledge         kPMLogClientAcknowledge
+#define PMlogClientTardy               kPMLogClientTardy
+#define PMlogClientCancel              kPMLogClientCancel
+