]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOHibernateInternal.h
xnu-4570.20.62.tar.gz
[apple/xnu.git] / iokit / Kernel / IOHibernateInternal.h
index fdaf45d062cbb636b80990b98d8258d5b2afe4c9..0c800aec59b7861ce7066a37b4cbbf7efb6b3a68 100644 (file)
@@ -36,48 +36,29 @@ struct IOHibernateVars
 {
     hibernate_page_list_t *            page_list;
     hibernate_page_list_t *            page_list_wired;
+    hibernate_page_list_t *            page_list_pal;
     class IOBufferMemoryDescriptor *    ioBuffer;
     class IOBufferMemoryDescriptor *    srcBuffer;
+    class IOBufferMemoryDescriptor *    handoffBuffer;
     class IOMemoryDescriptor *          previewBuffer;
     OSData *                           previewData;
-    OSData *                           fileExtents;
     OSObject *                         saveBootDevice;
 
     struct IOPolledFileIOVars *                fileVars;
+    uint64_t                           fileMinSize;
+    uint64_t                           fileMaxSize;
     vm_offset_t                                videoMapping;
     vm_size_t                          videoAllocSize;
     vm_size_t                          videoMapSize;
+    uint8_t *                          consoleMapping;
     uint8_t                            haveFastBoot;
     uint8_t                            saveBootAudioVolume;
     uint8_t                            wiredCryptKey[kIOHibernateAESKeySize / 8];
     uint8_t                            cryptKey[kIOHibernateAESKeySize / 8];
+    uint8_t                            volumeCryptKey[kIOHibernateAESKeySize / 8];
 };
 typedef struct IOHibernateVars IOHibernateVars;
 
-
-struct IOPolledFileIOVars
-{
-    struct kern_direct_file_io_ref_t * fileRef;
-    class OSArray *                    pollers;
-    IOByteCount                                blockSize;
-    uint8_t *                                  buffer;
-    IOByteCount                        bufferSize;
-    IOByteCount                        bufferLimit;
-    IOByteCount                        bufferOffset;
-    IOByteCount                        bufferHalf;
-    IOByteCount                                extentRemaining;
-    IOByteCount                                lastRead;
-    uint64_t                           block0;
-    uint64_t                           position;
-    uint64_t                           extentPosition;
-    uint64_t                           encryptStart;
-    IOPolledFileExtent *               extentMap;
-    IOPolledFileExtent *               currentExtent;
-    bool                               io;
-    IOReturn                           ioStatus;
-};
-typedef struct IOPolledFileIOVars IOPolledFileIOVars;
-
 #endif         /* __cplusplus */
 
 enum
@@ -90,13 +71,12 @@ enum
 extern "C"
 #endif         /* __cplusplus */
 uint32_t
-hibernate_sum(uint8_t *buf, int32_t len);
-
-extern vm_offset_t sectHIBB;
-extern int         sectSizeHIB;
-extern vm_offset_t sectDATAB;
-extern int         sectSizeDATA;
+hibernate_sum_page(uint8_t *buf, uint32_t ppnum);
 
-extern vm_offset_t gIOHibernateWakeMap;            // ppnum
-extern vm_size_t   gIOHibernateWakeMapSize;
+extern vm_offset_t segHIBB;
+extern unsigned long segSizeHIB;
+extern vm_offset_t segDATAB;
+extern unsigned long segSizeDATA;
 
+extern ppnum_t gIOHibernateHandoffPages[];
+extern uint32_t gIOHibernateHandoffPageCount;