]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/pwr_mgt/RootDomain.h
xnu-1699.32.7.tar.gz
[apple/xnu.git] / iokit / IOKit / pwr_mgt / RootDomain.h
index 760e7d6741304ee8575f099b4ab4d2749b25dfa1..351f7da64257617527e6c18c6cc33764484ee002 100644 (file)
@@ -381,8 +381,7 @@ public:
     void        handleQueueSleepWakeUUID(
                     OSObject *obj);
 
-    IOReturn    setMaintenanceWakeCalendar(
-                    const IOPMCalendarStruct * calendar );
+    IOReturn    setMaintenanceWakeCalendar(const IOPMCalendarStruct * calendar );
 
     // Handle callbacks from IOService::systemWillShutdown()
        void        acknowledgeSystemWillShutdown( IOService * from );
@@ -407,6 +406,9 @@ public:
     bool        systemMessageFilter(
                     void * object, void * arg1, void * arg2, void * arg3 );
 
+    void        publishPMSetting(
+                    const OSSymbol * feature, uint32_t where, uint32_t * featureID );
+
 /*! @function recordPMEvent
     @abstract Logs IOService PM event timing.
     @discussion Should only be called from IOServicePM. Should not be exported.
@@ -467,6 +469,7 @@ private:
     IOPMPowerStateQueue     *pmPowerStateQueue;
 
     OSArray                 *allowedPMSettings;
+    OSArray                 *noPublishPMSettings;
     PMTraceWorker           *pmTracer;
     PMAssertionsTracker     *pmAssertions;
 
@@ -565,19 +568,21 @@ private:
     unsigned int            logGraphicsClamp        :1;
     unsigned int            darkWakeToSleepASAP     :1;
     unsigned int            darkWakeMaintenance     :1;
-    unsigned int            darkWakePostTickle      :1;
+    unsigned int            darkWakeSleepService    :1;
 
+    unsigned int            darkWakePostTickle      :1;
     unsigned int            sleepTimerMaintenance   :1;
     unsigned int            lowBatteryCondition     :1;
     unsigned int            hibernateDisabled       :1;
     unsigned int            hibernateNoDefeat       :1;
-    unsigned int            hibernateAborted        :1;
     unsigned int            rejectWranglerTickle    :1;
+    unsigned int            wranglerTickleLatched   :1;
 
     uint32_t                hibernateMode;
     uint32_t                userActivityCount;
     uint32_t                userActivityAtSleep;
     uint32_t                lastSleepReason;
+    uint32_t                hibernateAborted;
 
     // Info for communicating system state changes to PMCPU
     int32_t                 idxPMCPUClamshell;
@@ -585,6 +590,7 @@ private:
 
     IOOptionBits            platformSleepSupport;
     uint32_t                _debugWakeSeconds;
+    uint32_t                _lastDebugWakeSeconds;
 
     queue_head_t            aggressivesQueue;
     thread_call_t           aggressivesThreadCall;
@@ -601,10 +607,15 @@ private:
 
     IOPMTimeline            *timeline;
 
+    IOPMSystemSleepPolicyHandler    _sleepPolicyHandler;
+    void *                          _sleepPolicyTarget;
+    IOPMSystemSleepPolicyVariables *_sleepPolicyVars;
+
        // IOPMrootDomain internal sleep call
     IOReturn    privateSleepSystem( uint32_t sleepReason );
     void        reportUserInput( void );
     bool        checkSystemCanSleep( IOOptionBits options = 0 );
+    bool        checkSystemCanSustainFullWake( void );
 
     void        adjustPowerState( bool sleepASAP = false );
     void        setQuickSpinDownTimeout( void );
@@ -647,14 +658,19 @@ private:
 
     void        evaluatePolicy( int stimulus, uint32_t arg = 0 );
 
+    void evaluateAssertions(IOPMDriverAssertionType newAssertions, 
+                                IOPMDriverAssertionType oldAssertions);
+
     void        deregisterPMSettingObject( PMSettingObject * pmso );
 
 #if HIBERNATION
     bool        getSleepOption( const char * key, uint32_t * option );
-    bool        evaluateSystemSleepPolicy( IOPMSystemSleepParameters * p );
+    bool        evaluateSystemSleepPolicy( IOPMSystemSleepParameters * p, int phase );
     void        evaluateSystemSleepPolicyEarly( void );
     void        evaluateSystemSleepPolicyFinal( void );
 #endif /* HIBERNATION */
+
+    bool        latchDisplayWranglerTickle( bool latch );
 #endif /* XNU_KERNEL_PRIVATE */
 };