~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/boot/compressed/efi.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef BOOT_COMPRESSED_EFI_H
  3 #define BOOT_COMPRESSED_EFI_H
  4 
  5 #if defined(_LINUX_EFI_H) || defined(_ASM_X86_EFI_H)
  6 #error Please do not include kernel proper namespace headers
  7 #endif
  8 
  9 typedef guid_t efi_guid_t __aligned(__alignof__(u32));
 10 
 11 #define EFI_GUID(a, b, c, d...) (efi_guid_t){ {                                 \
 12         (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff,  \
 13         (b) & 0xff, ((b) >> 8) & 0xff,                                          \
 14         (c) & 0xff, ((c) >> 8) & 0xff, d } }
 15 
 16 #define ACPI_TABLE_GUID                         EFI_GUID(0xeb9d2d30, 0x2d88, 0x11d3,  0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
 17 #define ACPI_20_TABLE_GUID                      EFI_GUID(0x8868e871, 0xe4f1, 0x11d3,  0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81)
 18 #define EFI_CC_BLOB_GUID                        EFI_GUID(0x067b1f5f, 0xcf26, 0x44c5, 0x85, 0x54, 0x93, 0xd7, 0x77, 0x91, 0x2d, 0x42)
 19 #define LINUX_EFI_UNACCEPTED_MEM_TABLE_GUID     EFI_GUID(0xd5d1de3c, 0x105c, 0x44f9,  0x9e, 0xa9, 0xbc, 0xef, 0x98, 0x12, 0x00, 0x31)
 20 
 21 #define EFI32_LOADER_SIGNATURE  "EL32"
 22 #define EFI64_LOADER_SIGNATURE  "EL64"
 23 
 24 /*
 25  * Generic EFI table header
 26  */
 27 typedef struct {
 28         u64 signature;
 29         u32 revision;
 30         u32 headersize;
 31         u32 crc32;
 32         u32 reserved;
 33 } efi_table_hdr_t;
 34 
 35 #define EFI_CONVENTIONAL_MEMORY          7
 36 #define EFI_UNACCEPTED_MEMORY           15
 37 
 38 #define EFI_MEMORY_MORE_RELIABLE \
 39                                 ((u64)0x0000000000010000ULL)    /* higher reliability */
 40 #define EFI_MEMORY_SP           ((u64)0x0000000000040000ULL)    /* soft reserved */
 41 
 42 #define EFI_PAGE_SHIFT          12
 43 
 44 typedef struct {
 45         u32 type;
 46         u32 pad;
 47         u64 phys_addr;
 48         u64 virt_addr;
 49         u64 num_pages;
 50         u64 attribute;
 51 } efi_memory_desc_t;
 52 
 53 #define efi_early_memdesc_ptr(map, desc_size, n)                        \
 54         (efi_memory_desc_t *)((void *)(map) + ((n) * (desc_size)))
 55 
 56 typedef struct {
 57         efi_guid_t guid;
 58         u64 table;
 59 } efi_config_table_64_t;
 60 
 61 typedef struct {
 62         efi_guid_t guid;
 63         u32 table;
 64 } efi_config_table_32_t;
 65 
 66 typedef struct {
 67         efi_table_hdr_t hdr;
 68         u64 fw_vendor;  /* physical addr of CHAR16 vendor string */
 69         u32 fw_revision;
 70         u32 __pad1;
 71         u64 con_in_handle;
 72         u64 con_in;
 73         u64 con_out_handle;
 74         u64 con_out;
 75         u64 stderr_handle;
 76         u64 stderr;
 77         u64 runtime;
 78         u64 boottime;
 79         u32 nr_tables;
 80         u32 __pad2;
 81         u64 tables;
 82 } efi_system_table_64_t;
 83 
 84 typedef struct {
 85         efi_table_hdr_t hdr;
 86         u32 fw_vendor;  /* physical addr of CHAR16 vendor string */
 87         u32 fw_revision;
 88         u32 con_in_handle;
 89         u32 con_in;
 90         u32 con_out_handle;
 91         u32 con_out;
 92         u32 stderr_handle;
 93         u32 stderr;
 94         u32 runtime;
 95         u32 boottime;
 96         u32 nr_tables;
 97         u32 tables;
 98 } efi_system_table_32_t;
 99 
100 struct efi_unaccepted_memory {
101         u32 version;
102         u32 unit_size;
103         u64 phys_base;
104         u64 size;
105         unsigned long bitmap[];
106 };
107 
108 static inline int efi_guidcmp (efi_guid_t left, efi_guid_t right)
109 {
110         return memcmp(&left, &right, sizeof (efi_guid_t));
111 }
112 
113 #ifdef CONFIG_EFI
114 bool __pure __efi_soft_reserve_enabled(void);
115 
116 static inline bool __pure efi_soft_reserve_enabled(void)
117 {
118         return IS_ENABLED(CONFIG_EFI_SOFT_RESERVE)
119                 && __efi_soft_reserve_enabled();
120 }
121 #else
122 static inline bool efi_soft_reserve_enabled(void)
123 {
124         return false;
125 }
126 #endif /* CONFIG_EFI */
127 #endif /* BOOT_COMPRESSED_EFI_H */
128 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php