]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/IOHibernatePrivate.h
xnu-7195.101.1.tar.gz
[apple/xnu.git] / iokit / IOKit / IOHibernatePrivate.h
1 /*
2 * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29 #ifndef __IOKIT_IOHIBERNATEPRIVATE_H
30 #define __IOKIT_IOHIBERNATEPRIVATE_H
31
32 #if HIBERNATION
33
34 #if defined(__arm64__)
35
36 #define HIBERNATE_HAVE_MACHINE_HEADER 1
37
38 // enable the hibernation exception handler on DEBUG and DEVELOPMENT kernels
39 #define HIBERNATE_TRAP_HANDLER (DEBUG || DEVELOPMENT)
40
41 #endif /* defined(__arm64__) */
42
43 #endif /* HIBERNATION */
44
45 #ifndef __ASSEMBLER__
46
47 #include <stdint.h>
48 #include <sys/cdefs.h>
49
50 __BEGIN_DECLS
51
52 #ifdef KERNEL
53 #include <libkern/crypto/aes.h>
54 #include <uuid/uuid.h>
55 #include <kern/debug.h>
56
57 extern int kdb_printf(const char *format, ...) __printflike(1, 2);
58 #endif /* KERNEL */
59
60 #define HIBERNATE_HMAC_SIZE 48 // SHA384 size in bytes
61
62 struct IOHibernateHibSegment {
63 uint32_t iBootMemoryRegion;
64 uint32_t physPage;
65 uint32_t pageCount;
66 uint32_t protection;
67 };
68 typedef struct IOHibernateHibSegment IOHibernateHibSegment;
69
70 #define NUM_HIBSEGINFO_SEGMENTS 10
71 struct IOHibernateHibSegInfo {
72 struct IOHibernateHibSegment segments[NUM_HIBSEGINFO_SEGMENTS];
73 uint8_t hmac[HIBERNATE_HMAC_SIZE];
74 };
75 typedef struct IOHibernateHibSegInfo IOHibernateHibSegInfo;
76
77 struct IOPolledFileExtent {
78 uint64_t start;
79 uint64_t length;
80 };
81 typedef struct IOPolledFileExtent IOPolledFileExtent;
82
83 struct IOHibernateImageHeader {
84 uint64_t imageSize;
85 uint64_t image1Size;
86
87 uint32_t restore1CodePhysPage;
88 uint32_t reserved1;
89 uint64_t restore1CodeVirt;
90 uint32_t restore1PageCount;
91 uint32_t restore1CodeOffset;
92 uint32_t restore1StackOffset;
93
94 uint32_t pageCount;
95 uint32_t bitmapSize;
96
97 uint32_t restore1Sum;
98 uint32_t image1Sum;
99 uint32_t image2Sum;
100
101 uint32_t actualRestore1Sum;
102 uint32_t actualImage1Sum;
103 uint32_t actualImage2Sum;
104
105 uint32_t actualUncompressedPages;
106 uint32_t conflictCount;
107 uint32_t nextFree;
108
109 uint32_t signature;
110 uint32_t processorFlags;
111
112 uint32_t runtimePages;
113 uint32_t runtimePageCount;
114 uint64_t runtimeVirtualPages __attribute__ ((packed));
115
116 uint32_t performanceDataStart;
117 uint32_t performanceDataSize;
118
119 uint64_t encryptStart __attribute__ ((packed));
120 uint64_t machineSignature __attribute__ ((packed));
121
122 uint32_t previewSize;
123 uint32_t previewPageListSize;
124
125 uint32_t diag[4];
126
127 uint32_t handoffPages;
128 uint32_t handoffPageCount;
129
130 uint32_t systemTableOffset;
131
132 uint32_t debugFlags;
133 uint32_t options;
134 uint64_t sleepTime __attribute__ ((packed));
135 uint32_t compression;
136
137 uint8_t bridgeBootSessionUUID[16];
138
139 uint64_t lastHibAbsTime __attribute__ ((packed));
140 union {
141 uint64_t lastHibContTime;
142 uint64_t hwClockOffset;
143 } __attribute__ ((packed));
144 uint64_t kernVirtSlide __attribute__ ((packed));
145
146 uint32_t reserved[47]; // make sizeof == 512
147 uint32_t booterTime0;
148 uint32_t booterTime1;
149 uint32_t booterTime2;
150
151 uint32_t booterStart;
152 uint32_t smcStart;
153 uint32_t connectDisplayTime;
154 uint32_t splashTime;
155 uint32_t booterTime;
156 uint32_t trampolineTime;
157
158 uint64_t encryptEnd __attribute__ ((packed));
159 uint64_t deviceBase __attribute__ ((packed));
160 uint32_t deviceBlockSize;
161
162 #if defined(__arm64__)
163 uint32_t segmentsFileOffset;
164 IOHibernateHibSegInfo hibSegInfo;
165 uint32_t imageHeaderHMACSize;
166 uint8_t imageHeaderHMAC[HIBERNATE_HMAC_SIZE];
167 uint8_t handoffHMAC[HIBERNATE_HMAC_SIZE];
168 uint8_t image1PagesHMAC[HIBERNATE_HMAC_SIZE];
169 uint8_t image2PagesHMAC[HIBERNATE_HMAC_SIZE];
170 #endif /* defined(__arm64__) */
171
172 uint32_t fileExtentMapSize;
173 IOPolledFileExtent fileExtentMap[2];
174 };
175 typedef struct IOHibernateImageHeader IOHibernateImageHeader;
176
177 enum{
178 kIOHibernateDebugRestoreLogs = 0x00000001
179 };
180
181 // options & IOHibernateOptions property
182 enum{
183 kIOHibernateOptionSSD = 0x00000001,
184 kIOHibernateOptionColor = 0x00000002,
185 kIOHibernateOptionProgress = 0x00000004,
186 kIOHibernateOptionDarkWake = 0x00000008,
187 kIOHibernateOptionHWEncrypt = 0x00000010,
188 };
189
190 struct hibernate_bitmap_t {
191 uint32_t first_page;
192 uint32_t last_page;
193 uint32_t bitmapwords;
194 uint32_t bitmap[0];
195 };
196 typedef struct hibernate_bitmap_t hibernate_bitmap_t;
197
198 struct hibernate_page_list_t {
199 uint32_t list_size;
200 uint32_t page_count;
201 uint32_t bank_count;
202 hibernate_bitmap_t bank_bitmap[0];
203 };
204 typedef struct hibernate_page_list_t hibernate_page_list_t;
205
206 #if defined(_AES_H)
207
208 struct hibernate_cryptwakevars_t {
209 uint8_t aes_iv[AES_BLOCK_SIZE];
210 };
211 typedef struct hibernate_cryptwakevars_t hibernate_cryptwakevars_t;
212
213 struct hibernate_cryptvars_t {
214 uint8_t aes_iv[AES_BLOCK_SIZE];
215 aes_ctx ctx;
216 };
217 typedef struct hibernate_cryptvars_t hibernate_cryptvars_t;
218
219 #endif /* defined(_AES_H) */
220
221 enum{
222 kIOHibernateHandoffType = 0x686f0000,
223 kIOHibernateHandoffTypeEnd = kIOHibernateHandoffType + 0,
224 kIOHibernateHandoffTypeGraphicsInfo = kIOHibernateHandoffType + 1,
225 kIOHibernateHandoffTypeCryptVars = kIOHibernateHandoffType + 2,
226 kIOHibernateHandoffTypeMemoryMap = kIOHibernateHandoffType + 3,
227 kIOHibernateHandoffTypeDeviceTree = kIOHibernateHandoffType + 4,
228 kIOHibernateHandoffTypeDeviceProperties = kIOHibernateHandoffType + 5,
229 kIOHibernateHandoffTypeKeyStore = kIOHibernateHandoffType + 6,
230 kIOHibernateHandoffTypeVolumeCryptKey = kIOHibernateHandoffType + 7,
231 };
232
233 struct IOHibernateHandoff {
234 uint32_t type;
235 uint32_t bytecount;
236 uint8_t data[];
237 };
238 typedef struct IOHibernateHandoff IOHibernateHandoff;
239
240 enum{
241 kIOHibernateProgressCount = 19,
242 kIOHibernateProgressWidth = 7,
243 kIOHibernateProgressHeight = 16,
244 kIOHibernateProgressSpacing = 3,
245 kIOHibernateProgressOriginY = 81,
246
247 kIOHibernateProgressSaveUnderSize = 2 * 5 + 14 * 2,
248
249 kIOHibernateProgressLightGray = 230,
250 kIOHibernateProgressMidGray = 174,
251 kIOHibernateProgressDarkGray = 92
252 };
253
254 enum{
255 kIOHibernatePostWriteSleep = 0,
256 kIOHibernatePostWriteWake = 1,
257 kIOHibernatePostWriteHalt = 2,
258 kIOHibernatePostWriteRestart = 3
259 };
260
261
262 struct hibernate_graphics_t {
263 uint64_t physicalAddress; // Base address of video memory
264 int32_t gfxStatus; // EFI config restore status
265 uint32_t rowBytes; // Number of bytes per pixel row
266 uint32_t width; // Width
267 uint32_t height; // Height
268 uint32_t depth; // Pixel Depth
269
270 uint8_t progressSaveUnder[kIOHibernateProgressCount][kIOHibernateProgressSaveUnderSize];
271 };
272 typedef struct hibernate_graphics_t hibernate_graphics_t;
273
274 #define DECLARE_IOHIBERNATEPROGRESSALPHA \
275 static const uint8_t gIOHibernateProgressAlpha \
276 [kIOHibernateProgressHeight][kIOHibernateProgressWidth] = \
277 { \
278 { 0x00,0x63,0xd8,0xf0,0xd8,0x63,0x00 }, \
279 { 0x51,0xff,0xff,0xff,0xff,0xff,0x51 }, \
280 { 0xae,0xff,0xff,0xff,0xff,0xff,0xae }, \
281 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
282 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
283 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
284 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
285 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
286 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
287 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
288 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
289 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
290 { 0xc3,0xff,0xff,0xff,0xff,0xff,0xc3 }, \
291 { 0xae,0xff,0xff,0xff,0xff,0xff,0xae }, \
292 { 0x54,0xff,0xff,0xff,0xff,0xff,0x54 }, \
293 { 0x00,0x66,0xdb,0xf3,0xdb,0x66,0x00 } \
294 };
295
296 struct hibernate_preview_t {
297 uint32_t imageCount; // Number of images
298 uint32_t width; // Width
299 uint32_t height; // Height
300 uint32_t depth; // Pixel Depth
301 uint64_t lockTime; // Lock time
302 uint32_t reservedG[7]; // reserved
303 uint32_t reservedK[8]; // reserved
304 };
305 typedef struct hibernate_preview_t hibernate_preview_t;
306
307 struct hibernate_statistics_t {
308 uint64_t image1Size;
309 uint64_t imageSize;
310 uint32_t image1Pages;
311 uint32_t imagePages;
312 uint32_t booterStart;
313 uint32_t smcStart;
314 uint32_t booterDuration;
315 uint32_t booterConnectDisplayDuration;
316 uint32_t booterSplashDuration;
317 uint32_t booterDuration0;
318 uint32_t booterDuration1;
319 uint32_t booterDuration2;
320 uint32_t trampolineDuration;
321 uint32_t kernelImageReadDuration;
322
323 uint32_t graphicsReadyTime;
324 uint32_t wakeNotificationTime;
325 uint32_t lockScreenReadyTime;
326 uint32_t hidReadyTime;
327
328 uint32_t wakeCapability;
329 uint32_t hibCount;
330 uint32_t resvA[14];
331 };
332 typedef struct hibernate_statistics_t hibernate_statistics_t;
333
334 #define kIOSysctlHibernateStatistics "kern.hibernatestatistics"
335 #define kIOSysctlHibernateGraphicsReady "kern.hibernategraphicsready"
336 #define kIOSysctlHibernateWakeNotify "kern.hibernatewakenotification"
337 #define kIOSysctlHibernateScreenReady "kern.hibernatelockscreenready"
338 #define kIOSysctlHibernateHIDReady "kern.hibernatehidready"
339 #define kIOSysctlHibernateCount "kern.hibernatecount"
340 #define kIOSysctlHibernateSetPreview "kern.hibernatepreview"
341
342 #define kIOHibernateSetPreviewEntitlementKey "com.apple.private.hibernation.set-preview"
343
344 #ifdef KERNEL
345
346 #ifdef __cplusplus
347
348 void IOHibernateSystemInit(IOPMrootDomain * rootDomain);
349
350 IOReturn IOHibernateSystemSleep(void);
351 IOReturn IOHibernateIOKitSleep(void);
352 IOReturn IOHibernateSystemHasSlept(void);
353 IOReturn IOHibernateSystemWake(void);
354 IOReturn IOHibernateSystemPostWake(bool now);
355 uint32_t IOHibernateWasScreenLocked(void);
356 void IOHibernateSetScreenLocked(uint32_t lockState);
357 void IOHibernateSetWakeCapabilities(uint32_t capability);
358 void IOHibernateSystemRestart(void);
359
360 #endif /* __cplusplus */
361
362 struct hibernate_scratch {
363 uint8_t *curPage;
364 size_t curPagePos;
365 uint64_t curPos;
366 uint64_t totalLength;
367 ppnum_t headPage;
368 hibernate_page_list_t *map;
369 uint32_t *nextFree;
370 };
371 typedef struct hibernate_scratch hibernate_scratch_t;
372
373 void
374 vm_compressor_do_warmup(void);
375
376
377 hibernate_page_list_t *
378 hibernate_page_list_allocate(boolean_t log);
379
380 kern_return_t
381 hibernate_alloc_page_lists(
382 hibernate_page_list_t ** page_list_ret,
383 hibernate_page_list_t ** page_list_wired_ret,
384 hibernate_page_list_t ** page_list_pal_ret);
385
386 kern_return_t
387 hibernate_setup(IOHibernateImageHeader * header,
388 boolean_t vmflush,
389 hibernate_page_list_t * page_list,
390 hibernate_page_list_t * page_list_wired,
391 hibernate_page_list_t * page_list_pal);
392
393 kern_return_t
394 hibernate_teardown(hibernate_page_list_t * page_list,
395 hibernate_page_list_t * page_list_wired,
396 hibernate_page_list_t * page_list_pal);
397
398 kern_return_t
399 hibernate_pin_swap(boolean_t begin);
400
401 kern_return_t
402 hibernate_processor_setup(IOHibernateImageHeader * header);
403
404 void
405 hibernate_gobble_pages(uint32_t gobble_count, uint32_t free_page_time);
406 void
407 hibernate_free_gobble_pages(void);
408
409 void
410 hibernate_vm_lock_queues(void);
411 void
412 hibernate_vm_unlock_queues(void);
413
414 void
415 hibernate_vm_lock(void);
416 void
417 hibernate_vm_unlock(void);
418 void
419 hibernate_vm_lock_end(void);
420 boolean_t
421 hibernate_vm_locks_are_safe(void);
422
423 // mark pages not to be saved, based on VM system accounting
424 void
425 hibernate_page_list_setall(hibernate_page_list_t * page_list,
426 hibernate_page_list_t * page_list_wired,
427 hibernate_page_list_t * page_list_pal,
428 boolean_t preflight,
429 boolean_t discard_all,
430 uint32_t * pagesOut);
431
432 // mark pages to be saved, or pages not to be saved but available
433 // for scratch usage during restore
434 void
435 hibernate_page_list_setall_machine(hibernate_page_list_t * page_list,
436 hibernate_page_list_t * page_list_wired,
437 boolean_t preflight,
438 uint32_t * pagesOut);
439
440 // mark pages not to be saved and not for scratch usage during restore
441 void
442 hibernate_page_list_set_volatile( hibernate_page_list_t * page_list,
443 hibernate_page_list_t * page_list_wired,
444 uint32_t * pagesOut);
445
446 void
447 hibernate_page_list_discard(hibernate_page_list_t * page_list);
448
449 int
450 hibernate_should_abort(void);
451
452 void
453 hibernate_set_page_state(hibernate_page_list_t * page_list, hibernate_page_list_t * page_list_wired,
454 vm_offset_t ppnum, vm_offset_t count, uint32_t kind);
455
456 void
457 hibernate_page_bitset(hibernate_page_list_t * list, boolean_t set, uint32_t page);
458
459 boolean_t
460 hibernate_page_bittst(hibernate_page_list_t * list, uint32_t page);
461
462 hibernate_bitmap_t *
463 hibernate_page_bitmap_pin(hibernate_page_list_t * list, uint32_t * page);
464
465 uint32_t
466 hibernate_page_bitmap_count(hibernate_bitmap_t * bitmap, uint32_t set, uint32_t page);
467
468 uintptr_t
469 hibernate_restore_phys_page(uint64_t src, uint64_t dst, uint32_t len, uint32_t procFlags);
470
471 void
472 hibernate_scratch_init(hibernate_scratch_t * scratch, hibernate_page_list_t * map, uint32_t * nextFree);
473
474 void
475 hibernate_scratch_start_read(hibernate_scratch_t * scratch);
476
477 void
478 hibernate_scratch_write(hibernate_scratch_t * scratch, const void * buffer, size_t size);
479
480 void
481 hibernate_scratch_read(hibernate_scratch_t * scratch, void * buffer, size_t size);
482
483 void
484 hibernate_machine_init(void);
485
486 uint32_t
487 hibernate_write_image(void);
488
489 ppnum_t
490 hibernate_page_list_grab(hibernate_page_list_t * list, uint32_t * pNextFree);
491
492 void
493 hibernate_reserve_restore_pages(uint64_t headerPhys, IOHibernateImageHeader *header, hibernate_page_list_t * map);
494
495 long
496 hibernate_machine_entrypoint(uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4);
497 long
498 hibernate_kernel_entrypoint(uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4);
499 void
500 hibernate_newruntime_map(void * map, vm_size_t map_size,
501 uint32_t system_table_offset);
502
503
504 extern uint32_t gIOHibernateState;
505 extern uint32_t gIOHibernateMode;
506 extern uint32_t gIOHibernateDebugFlags;
507 extern uint32_t gIOHibernateFreeTime; // max time to spend freeing pages (ms)
508 extern boolean_t gIOHibernateStandbyDisabled;
509 #if !defined(__arm64__)
510 extern uint8_t gIOHibernateRestoreStack[];
511 extern uint8_t gIOHibernateRestoreStackEnd[];
512 #endif /* !defined(__arm64__) */
513 extern IOHibernateImageHeader * gIOHibernateCurrentHeader;
514
515 #define HIBLOGFROMPANIC(fmt, args...) \
516 { if (kernel_debugger_entry_count) { kdb_printf(fmt, ## args); } }
517
518 #define HIBLOG(fmt, args...) \
519 { if (kernel_debugger_entry_count) { kdb_printf(fmt, ## args); } else { kprintf(fmt, ## args); printf(fmt, ## args); } }
520
521 #define HIBPRINT(fmt, args...) \
522 { if (kernel_debugger_entry_count) { kdb_printf(fmt, ## args); } else { kprintf(fmt, ## args); } }
523
524
525 #endif /* KERNEL */
526
527 // gIOHibernateState, kIOHibernateStateKey
528 enum{
529 kIOHibernateStateInactive = 0,
530 kIOHibernateStateHibernating = 1,/* writing image */
531 kIOHibernateStateWakingFromHibernate = 2 /* booted and restored image */
532 };
533
534 // gIOHibernateMode, kIOHibernateModeKey
535 enum{
536 kIOHibernateModeOn = 0x00000001,
537 kIOHibernateModeSleep = 0x00000002,
538 kIOHibernateModeEncrypt = 0x00000004,
539 kIOHibernateModeDiscardCleanInactive = 0x00000008,
540 kIOHibernateModeDiscardCleanActive = 0x00000010,
541 kIOHibernateModeSwitch = 0x00000020,
542 kIOHibernateModeRestart = 0x00000040,
543 kIOHibernateModeSSDInvert = 0x00000080,
544 kIOHibernateModeFileResize = 0x00000100,
545 };
546
547 // IOHibernateImageHeader.signature
548 enum{
549 kIOHibernateHeaderSignature = 0x73696d65,
550 kIOHibernateHeaderInvalidSignature = 0x7a7a7a7a,
551 kIOHibernateHeaderOpenSignature = 0xf1e0be9d,
552 kIOHibernateHeaderDebugDataSignature = 0xfcddfcdd
553 };
554
555 // kind for hibernate_set_page_state()
556 enum{
557 kIOHibernatePageStateFree = 0,
558 kIOHibernatePageStateWiredSave = 1,
559 kIOHibernatePageStateUnwiredSave = 2
560 };
561
562 #define kIOHibernateModeKey "Hibernate Mode"
563 #define kIOHibernateFileKey "Hibernate File"
564 #define kIOHibernateFileMinSizeKey "Hibernate File Min"
565 #define kIOHibernateFileMaxSizeKey "Hibernate File Max"
566 #define kIOHibernateFreeRatioKey "Hibernate Free Ratio"
567 #define kIOHibernateFreeTimeKey "Hibernate Free Time"
568
569 #define kIOHibernateStateKey "IOHibernateState"
570 #define kIOHibernateFeatureKey "Hibernation"
571 #define kIOHibernatePreviewBufferKey "IOPreviewBuffer"
572
573 #ifndef kIOHibernatePreviewActiveKey
574 #define kIOHibernatePreviewActiveKey "IOHibernatePreviewActive"
575 // values for kIOHibernatePreviewActiveKey
576 enum {
577 kIOHibernatePreviewActive = 0x00000001,
578 kIOHibernatePreviewUpdates = 0x00000002
579 };
580 #endif
581
582 #define kIOHibernateOptionsKey "IOHibernateOptions"
583 #define kIOHibernateGfxStatusKey "IOHibernateGfxStatus"
584 enum {
585 kIOHibernateGfxStatusUnknown = ((int32_t) 0xFFFFFFFF)
586 };
587
588 #define kIOHibernateBootImageKey "boot-image"
589 #define kIOHibernateBootImageKeyKey "boot-image-key"
590 #define kIOHibernateBootSignatureKey "boot-signature"
591
592 #define kIOHibernateMemorySignatureKey "memory-signature"
593 #define kIOHibernateMemorySignatureEnvKey "mem-sig"
594 #define kIOHibernateMachineSignatureKey "machine-signature"
595
596 #define kIOHibernateRTCVariablesKey "IOHibernateRTCVariables"
597 #define kIOHibernateSMCVariablesKey "IOHibernateSMCVariables"
598
599 #define kIOHibernateBootSwitchVarsKey "boot-switch-vars"
600
601 #define kIOHibernateBootNoteKey "boot-note"
602
603
604 #define kIOHibernateUseKernelInterpreter 0x80000000
605
606 enum{
607 kIOPreviewImageIndexDesktop = 0,
608 kIOPreviewImageIndexLockScreen = 1,
609 kIOPreviewImageCount = 2
610 };
611
612 enum{
613 kIOScreenLockNoLock = 1,
614 kIOScreenLockUnlocked = 2,
615 kIOScreenLockLocked = 3,
616 kIOScreenLockFileVaultDialog = 4,
617 };
618
619 #define kIOScreenLockStateKey "IOScreenLockState"
620 #define kIOBooterScreenLockStateKey "IOBooterScreenLockState"
621
622 __END_DECLS
623
624 #endif /* !__ASSEMBLER__ */
625
626 #endif /* ! __IOKIT_IOHIBERNATEPRIVATE_H */