X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405..d26ffc64f583ab2d29df48f13518685602bc8832:/iokit/IOKit/IOPlatformExpert.h diff --git a/iokit/IOKit/IOPlatformExpert.h b/iokit/IOKit/IOPlatformExpert.h index f66f8da1f..4f5c8067f 100644 --- a/iokit/IOKit/IOPlatformExpert.h +++ b/iokit/IOKit/IOPlatformExpert.h @@ -47,6 +47,13 @@ extern "C" { #include +typedef enum { + kCoprocessorVersionNone = 0x00000000, + kCoprocessorVersion1 = 0x00010000, + kCoprocessorVersion2 = 0x00020000, +} coprocessor_type_t; + + extern boolean_t PEGetMachineName( char * name, int maxLength ); extern boolean_t PEGetModelName( char * name, int maxLength ); extern int PEGetPlatformEpoch( void ); @@ -66,9 +73,23 @@ enum { extern int (*PE_halt_restart)(unsigned int type); extern int PEHaltRestart(unsigned int type); +#ifdef XNU_KERNEL_PRIVATE +enum { + kIOSystemShutdownNotificationStageProcessExit = 0, + kIOSystemShutdownNotificationStageRootUnmount = 1, +}; +extern void IOSystemShutdownNotification(int stage); +#endif /* XNU_KERNEL_PRIVATE */ + // 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 void PESavePanicInfoAction(void *buffer, UInt32 offset, UInt32 length); + +/* + * SMC requires that all data is flushed in multiples of 16 bytes at 16 byte + * boundaries. + */ +#define PANIC_FLUSH_BOUNDARY 16 extern long PEGetGMTTimeOfDay( void ); extern void PESetGMTTimeOfDay( long secs ); @@ -84,12 +105,16 @@ extern boolean_t PEReadNVRAMProperty(const char *symbol, void *value, unsigned i extern boolean_t PERemoveNVRAMProperty(const char *symbol); +extern coprocessor_type_t PEGetCoprocessorVersion( void ); + #ifdef __cplusplus } /* extern "C" */ #define kIOPlatformMapperPresentKey "IOPlatformMapperPresent" + + extern OSSymbol * gPlatformInterruptControllerName; extern const OSSymbol * gIOPlatformSleepActionKey; @@ -124,7 +149,7 @@ protected: int numInstancesRegistered; struct ExpansionData { }; - ExpansionData *reserved; + ExpansionData *iope_reserved __unused; virtual void setBootROMType(long peBootROMType); virtual void setChipSetType(long peChipSetType); @@ -219,7 +244,7 @@ private: IODTNVRAM *dtNVRAM; struct ExpansionData { }; - ExpansionData *reserved; + ExpansionData *iodtpe_reserved; public: virtual IOService * probe( IOService * provider, @@ -296,7 +321,7 @@ private: IOWorkLoop *workLoop; struct ExpansionData { }; - ExpansionData *reserved; + ExpansionData *ioped_reserved __unused; public: virtual bool initWithArgs( void * p1, void * p2, @@ -328,7 +353,7 @@ class IOPlatformDevice : public IOService OSDeclareDefaultStructors(IOPlatformDevice) struct ExpansionData { }; - ExpansionData *reserved; + ExpansionData *iopd_reserved; public: virtual bool compareName( OSString * name, OSString ** matched = 0 ) const APPLE_KEXT_OVERRIDE;