Loading...
iokit/Kernel/IOPMrootDomain.cpp xnu-792.6.61 xnu-792
--- xnu/xnu-792.6.61/iokit/Kernel/IOPMrootDomain.cpp
+++ xnu/xnu-792/iokit/Kernel/IOPMrootDomain.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -33,11 +33,40 @@
 #include "IOKit/pwr_mgt/IOPowerConnection.h"
 #include "IOPMPowerStateQueue.h"
 #include <IOKit/IOCatalogue.h>
-#include <IOKit/IOHibernatePrivate.h>
-
-#ifdef __ppc__
-#include <ppc/pms.h>
-#endif
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+#include <IOKit/IOPolledInterface.h>
+
+OSDefineMetaClassAndAbstractStructors(IOPolledInterface, OSObject);
+
+OSMetaClassDefineReservedUnused(IOPolledInterface, 0);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 1);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 2);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 3);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 4);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 5);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 6);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 7);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 8);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 9);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 10);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 11);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 12);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 13);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 14);
+OSMetaClassDefineReservedUnused(IOPolledInterface, 15);
+
+IOReturn
+IOPolledInterface::checkAllForWork(void)
+{
+    return (kIOReturnSuccess);
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
 
 extern "C" void kprintf(const char *, ...);
 
@@ -188,7 +217,6 @@
     IOService                               *rootDomain = (IOService *) p0;
     unsigned long                           pmRef = (unsigned long) p1;
 
-    IOHibernateSystemSleep();
     sync_internal();
     rootDomain->allowPowerChange(pmRef);
 }
@@ -286,7 +314,6 @@
         temp_entry->release();
     }
 
-    IOHibernateSystemInit(this);
 
     registerService();						// let clients find us
 
@@ -326,10 +353,6 @@
     const OSSymbol                            *fileserver_string = OSSymbol::withCString("AutoRestartOnPowerLoss");
     const OSSymbol                            *wakeonlid_string = OSSymbol::withCString("WakeOnLid");
     const OSSymbol                            *wakeonac_string = OSSymbol::withCString("WakeOnACChange");
-    const OSSymbol                            *hibernatemode_string = OSSymbol::withCString(kIOHibernateModeKey);
-    const OSSymbol                            *hibernatefile_string = OSSymbol::withCString(kIOHibernateFileKey);
-    const OSSymbol                            *hibernatefreeratio_string = OSSymbol::withCString(kIOHibernateFreeRatioKey);
-    const OSSymbol                            *hibernatefreetime_string = OSSymbol::withCString(kIOHibernateFreeTimeKey);
     const OSSymbol                            *timezone_string = OSSymbol::withCString("TimeZoneOffsetSeconds");
     
     if(!dict) 
@@ -358,26 +381,6 @@
         setProperty(stall_halt_string, b);
     }
 
-    if ( hibernatemode_string
-	&& (n = OSDynamicCast(OSNumber, dict->getObject(hibernatemode_string))))
-    {
-	setProperty(hibernatemode_string, n);
-    }
-    if ( hibernatefreeratio_string
-	&& (n = OSDynamicCast(OSNumber, dict->getObject(hibernatefreeratio_string))))
-    {
-	setProperty(hibernatefreeratio_string, n);
-    }
-    if ( hibernatefreetime_string
-	&& (n = OSDynamicCast(OSNumber, dict->getObject(hibernatefreetime_string))))
-    {
-	setProperty(hibernatefreetime_string, n);
-    }
-    if ( hibernatefile_string
-	&& (str = OSDynamicCast(OSString, dict->getObject(hibernatefile_string))))
-    {
-	setProperty(hibernatefile_string, str);
-    }
 
     // Relay AutoWake setting to its controller
     if( auto_wake_string
@@ -579,24 +582,8 @@
 // same thread.
 //*********************************************************************************
 
-static int pmsallsetup = 0;
-
 IOReturn IOPMrootDomain::setAggressiveness ( unsigned long type, unsigned long newLevel )
 {
-#ifdef __ppc__
-	if(pmsExperimental & 3) kprintf("setAggressiveness: type = %08X, newlevel = %08X\n", type, newLevel);
-	if(pmsExperimental & 1) {						/* Is experimental mode enabled? */
-		if(pmsInstalled && (type == kPMSetProcessorSpeed)) {	/* We want to look at all processor speed changes if stepper is installed */
-			if(pmsallsetup) return kIOReturnSuccess;	/* If already running, just eat this */
-			kprintf("setAggressiveness: starting stepper...\n");
-			pmsallsetup = 1;						/* Remember we did this */
-			pmsPark();
-			pmsStart();								/* Get it all started up... */
-			return kIOReturnSuccess;				/* Leave now... */
-		}
-	}
-#endif
-
     if ( pm_vars->PMcommandGate ) {
         pm_vars->PMcommandGate->runAction(broadcast_aggressiveness,(void *)type,(void *)newLevel);
     }
@@ -672,17 +659,13 @@
                 // re-enable this timer for next sleep
                 idleSleepPending = false;			
 
-                IOLog("System %sSleep\n", gIOHibernateState ? "Safe" : "");
-
-                IOHibernateSystemHasSlept();
-
+                IOLog("System Sleep\n");
                 pm_vars->thePlatform->sleepKernel();
 
                 // The CPU(s) are off at this point. When they're awakened by CPU interrupt,
                 // code will resume execution here.
 
                 // Now we're waking...
-		IOHibernateSystemWake();
 
                 // stay awake for at least 30 seconds
                 clock_interval_to_deadline(30, kSecondScale, &deadline);	
@@ -707,7 +690,7 @@
                 tellClients(kIOMessageSystemWillPowerOn);
 
                 // tell the tree we're waking
-                IOLog("System %sWake\n", gIOHibernateState ? "SafeSleep " : "");
+                IOLog("System Wake\n");
                 systemWake();
                 
                 // Allow drivers to request extra processing time before clamshell
@@ -1135,7 +1118,6 @@
 {
     if ( stateNum == ON_STATE ) 
     {
-	IOHibernateSystemPostWake();
         return tellClients(kIOMessageSystemHasPoweredOn);
     }
 }
@@ -1235,8 +1217,6 @@
 
             // We will ack within 20 seconds
             params->returnValue = 20 * 1000 * 1000;
-            if (gIOHibernateState)
-                params->returnValue += gIOHibernateFreeTime * 1000; 	//add in time we could spend freeing pages
 
             if ( ! OSCompareAndSwap( 0, 1, &gSleepOrShutdownPending ) )
             {