]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/IOKit/IOPlatformExpert.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / iokit / IOKit / IOPlatformExpert.h
index bdd1ef6a2dd8c67aa01d832efeaae49c6c81575c..936809c7c9582c6fa0dc757ec309db5a3c5307a8 100644 (file)
@@ -58,19 +58,25 @@ enum {
   kPEUPSDelayHaltCPU,
   kPEPanicRestartCPU,
   kPEPanicSync,
-  kPEPagingOff
+  kPEPagingOff,
+  kPEPanicBegin,
+  kPEPanicEnd
 };
 extern int (*PE_halt_restart)(unsigned int type);
 extern int PEHaltRestart(unsigned int type);
 
 // Save the Panic Info.  Returns the number of bytes saved.
 extern UInt32 PESavePanicInfo(UInt8 *buffer, UInt32 length);
+extern void PESavePanicInfoAction(void *buffer, size_t length);
 
 extern long PEGetGMTTimeOfDay( void );
 extern void PESetGMTTimeOfDay( long secs );
-  
+extern void PEGetUTCTimeOfDay( clock_sec_t * secs, clock_usec_t * usecs );
+extern void PESetUTCTimeOfDay( clock_sec_t secs, clock_usec_t usecs );
+
 /* unless it's a "well-known" property, these will read/write out the value as raw data */
 
+extern boolean_t PEWriteNVRAMBooleanProperty(const char *symbol, boolean_t value);
 extern boolean_t PEWriteNVRAMProperty(const char *symbol, const void *value, const unsigned int len);
 
 extern boolean_t PEReadNVRAMProperty(const char *symbol, void *value, unsigned int *len);
@@ -89,6 +95,8 @@ extern const OSSymbol *               gIOPlatformSleepActionKey;
 extern const OSSymbol *                gIOPlatformWakeActionKey;
 extern const OSSymbol *                gIOPlatformQuiesceActionKey;
 extern const OSSymbol *                gIOPlatformActiveActionKey;
+extern const OSSymbol *                gIOPlatformHaltRestartActionKey;
+extern const OSSymbol *                gIOPlatformPanicActionKey;
 
 class IORangeAllocator;
 class IONVRAMController;
@@ -127,8 +135,8 @@ protected:
     virtual void PMInstantiatePowerDomains ( void );
 
 public:
-    virtual bool attach( IOService * provider );
-    virtual bool start( IOService * provider );
+    virtual bool attach( IOService * provider ) APPLE_KEXT_OVERRIDE;
+    virtual bool start( IOService * provider ) APPLE_KEXT_OVERRIDE;
     virtual bool configure( IOService * provider );
     virtual IOService * createNub( OSDictionary * from );
 
@@ -162,7 +170,7 @@ public:
     virtual IOReturn callPlatformFunction(const OSSymbol *functionName,
                                          bool waitForFunction,
                                          void *param1, void *param2,
-                                         void *param3, void *param4);
+                                         void *param3, void *param4) APPLE_KEXT_OVERRIDE;
 
     virtual IORangeAllocator * getPhysicalRangeAllocator(void);
 
@@ -178,12 +186,17 @@ public:
     virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length);
 
     virtual OSString* createSystemSerialNumberString(OSData* myProperty);
-    
+
+    virtual IOReturn deregisterInterruptController(OSSymbol *name);
+
+    virtual void getUTCTimeOfDay( clock_sec_t * secs, clock_nsec_t * nsecs );
+    virtual void setUTCTimeOfDay( clock_sec_t secs, clock_nsec_t nsecs );
+
     OSMetaClassDeclareReservedUsed(IOPlatformExpert,  0);
     OSMetaClassDeclareReservedUsed(IOPlatformExpert,  1);
-    OSMetaClassDeclareReservedUnused(IOPlatformExpert,  2);
-    OSMetaClassDeclareReservedUnused(IOPlatformExpert,  3);
-    OSMetaClassDeclareReservedUnused(IOPlatformExpert,  4);
+    OSMetaClassDeclareReservedUsed(IOPlatformExpert,  2);
+    OSMetaClassDeclareReservedUsed(IOPlatformExpert,  3);
+    OSMetaClassDeclareReservedUsed(IOPlatformExpert,  4);
     OSMetaClassDeclareReservedUnused(IOPlatformExpert,  5);
     OSMetaClassDeclareReservedUnused(IOPlatformExpert,  6);
     OSMetaClassDeclareReservedUnused(IOPlatformExpert,  7);
@@ -209,8 +222,8 @@ private:
 
 public:
     virtual IOService * probe( IOService *     provider,
-                               SInt32    *     score );
-    virtual bool configure( IOService * provider );
+                               SInt32    *     score ) APPLE_KEXT_OVERRIDE;
+    virtual bool configure( IOService * provider ) APPLE_KEXT_OVERRIDE;
 
     virtual void processTopLevel( IORegistryEntry * root );
     virtual const char * deleteList( void ) = 0;
@@ -219,16 +232,16 @@ public:
     virtual bool createNubs( IOService * parent, OSIterator * iter );
 
     virtual bool compareNubName( const IOService * nub, OSString * name,
-                                OSString ** matched = 0 ) const;
+                                OSString ** matched = 0 ) const APPLE_KEXT_OVERRIDE;
 
-    virtual IOReturn getNubResources( IOService * nub );
+    virtual IOReturn getNubResources( IOService * nub ) APPLE_KEXT_OVERRIDE;
 
-    virtual bool getModelName( char * name, int maxLength );
-    virtual bool getMachineName( char * name, int maxLength );
+    virtual bool getModelName( char * name, int maxLength ) APPLE_KEXT_OVERRIDE;
+    virtual bool getMachineName( char * name, int maxLength ) APPLE_KEXT_OVERRIDE;
     
-    virtual void registerNVRAMController( IONVRAMController * nvram );
+    virtual void registerNVRAMController( IONVRAMController * nvram ) APPLE_KEXT_OVERRIDE;
 
-    virtual int haltRestart(unsigned int type);
+    virtual int haltRestart(unsigned int type) APPLE_KEXT_OVERRIDE;
 
     /* virtual */ IOReturn readXPRAM(IOByteCount offset, UInt8 * buffer,
                                     IOByteCount length);
@@ -257,8 +270,8 @@ public:
                                               IOByteCount offset, UInt8 * buffer,
                                               IOByteCount length);
 
-    virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length);
-    virtual OSString* createSystemSerialNumberString(OSData* myProperty);
+    virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length) APPLE_KEXT_OVERRIDE;
+    virtual OSString* createSystemSerialNumberString(OSData* myProperty) APPLE_KEXT_OVERRIDE;
 
     OSMetaClassDeclareReservedUnused(IODTPlatformExpert,  0);
     OSMetaClassDeclareReservedUnused(IODTPlatformExpert,  1);
@@ -287,12 +300,17 @@ private:
 public:
     virtual bool initWithArgs( void * p1, void * p2,
                                        void * p3, void *p4 );
-    virtual bool compareName( OSString * name, OSString ** matched = 0 ) const;
+    virtual bool compareName( OSString * name, OSString ** matched = 0 ) const APPLE_KEXT_OVERRIDE;
+
+    virtual IOWorkLoop *getWorkLoop() const APPLE_KEXT_OVERRIDE;
+    virtual IOReturn setProperties( OSObject * properties ) APPLE_KEXT_OVERRIDE;
+
+    virtual void free() APPLE_KEXT_OVERRIDE;
 
-    virtual IOWorkLoop *getWorkLoop() const;
-    virtual IOReturn setProperties( OSObject * properties );
+    virtual IOReturn newUserClient( task_t owningTask, void * securityID,
+                                    UInt32 type,  OSDictionary * properties,
+                                    IOUserClient ** handler) APPLE_KEXT_OVERRIDE;
 
-    virtual void free();
 
     OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice,  0);
     OSMetaClassDeclareReservedUnused(IOPlatformExpertDevice,  1);
@@ -312,9 +330,9 @@ class IOPlatformDevice : public IOService
     ExpansionData *reserved;
 
 public:
-    virtual bool compareName( OSString * name, OSString ** matched = 0 ) const;
-    virtual IOService * matchLocation( IOService * client );
-    virtual IOReturn getResources( void );
+    virtual bool compareName( OSString * name, OSString ** matched = 0 ) const APPLE_KEXT_OVERRIDE;
+    virtual IOService * matchLocation( IOService * client ) APPLE_KEXT_OVERRIDE;
+    virtual IOReturn getResources( void ) APPLE_KEXT_OVERRIDE;
 
     OSMetaClassDeclareReservedUnused(IOPlatformDevice,  0);
     OSMetaClassDeclareReservedUnused(IOPlatformDevice,  1);