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