Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Definitions for the wakeup data structure at the head of the
0004  * wakeup code.
0005  */
0006 
0007 #ifndef ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H
0008 #define ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H
0009 
0010 #ifndef __ASSEMBLY__
0011 #include <linux/types.h>
0012 
0013 /* This must match data at wakeup.S */
0014 struct wakeup_header {
0015     u16 video_mode;     /* Video mode number */
0016     u32 pmode_entry;    /* Protected mode resume point, 32-bit only */
0017     u16 pmode_cs;
0018     u32 pmode_cr0;      /* Protected mode cr0 */
0019     u32 pmode_cr3;      /* Protected mode cr3 */
0020     u32 pmode_cr4;      /* Protected mode cr4 */
0021     u32 pmode_efer_low; /* Protected mode EFER */
0022     u32 pmode_efer_high;
0023     u64 pmode_gdt;
0024     u32 pmode_misc_en_low;  /* Protected mode MISC_ENABLE */
0025     u32 pmode_misc_en_high;
0026     u32 pmode_behavior; /* Wakeup routine behavior flags */
0027     u32 realmode_flags;
0028     u32 real_magic;
0029     u32 signature;      /* To check we have correct structure */
0030 } __attribute__((__packed__));
0031 
0032 extern struct wakeup_header wakeup_header;
0033 #endif
0034 
0035 #define WAKEUP_HEADER_OFFSET    8
0036 #define WAKEUP_HEADER_SIGNATURE 0x51ee1111
0037 
0038 /* Wakeup behavior bits */
0039 #define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE     0
0040 #define WAKEUP_BEHAVIOR_RESTORE_CR4     1
0041 #define WAKEUP_BEHAVIOR_RESTORE_EFER        2
0042 
0043 #endif /* ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H */