diff options
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index e376270cd26..2362a0bc7f0 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/pfn.h> | 21 | #include <linux/pfn.h> |
22 | #include <linux/pstore.h> | ||
22 | 23 | ||
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
@@ -101,6 +102,13 @@ typedef struct { | |||
101 | u64 attribute; | 102 | u64 attribute; |
102 | } efi_memory_desc_t; | 103 | } efi_memory_desc_t; |
103 | 104 | ||
105 | typedef struct { | ||
106 | efi_guid_t guid; | ||
107 | u32 headersize; | ||
108 | u32 flags; | ||
109 | u32 imagesize; | ||
110 | } efi_capsule_header_t; | ||
111 | |||
104 | typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg); | 112 | typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg); |
105 | 113 | ||
106 | /* | 114 | /* |
@@ -156,6 +164,9 @@ typedef struct { | |||
156 | unsigned long set_variable; | 164 | unsigned long set_variable; |
157 | unsigned long get_next_high_mono_count; | 165 | unsigned long get_next_high_mono_count; |
158 | unsigned long reset_system; | 166 | unsigned long reset_system; |
167 | unsigned long update_capsule; | ||
168 | unsigned long query_capsule_caps; | ||
169 | unsigned long query_variable_info; | ||
159 | } efi_runtime_services_t; | 170 | } efi_runtime_services_t; |
160 | 171 | ||
161 | typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc); | 172 | typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc); |
@@ -168,7 +179,7 @@ typedef efi_status_t efi_get_variable_t (efi_char16_t *name, efi_guid_t *vendor, | |||
168 | typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char16_t *name, | 179 | typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char16_t *name, |
169 | efi_guid_t *vendor); | 180 | efi_guid_t *vendor); |
170 | typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, | 181 | typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor, |
171 | unsigned long attr, unsigned long data_size, | 182 | u32 attr, unsigned long data_size, |
172 | void *data); | 183 | void *data); |
173 | typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); | 184 | typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count); |
174 | typedef void efi_reset_system_t (int reset_type, efi_status_t status, | 185 | typedef void efi_reset_system_t (int reset_type, efi_status_t status, |
@@ -177,6 +188,17 @@ typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_siz | |||
177 | unsigned long descriptor_size, | 188 | unsigned long descriptor_size, |
178 | u32 descriptor_version, | 189 | u32 descriptor_version, |
179 | efi_memory_desc_t *virtual_map); | 190 | efi_memory_desc_t *virtual_map); |
191 | typedef efi_status_t efi_query_variable_info_t(u32 attr, | ||
192 | u64 *storage_space, | ||
193 | u64 *remaining_space, | ||
194 | u64 *max_variable_size); | ||
195 | typedef efi_status_t efi_update_capsule_t(efi_capsule_header_t **capsules, | ||
196 | unsigned long count, | ||
197 | unsigned long sg_list); | ||
198 | typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules, | ||
199 | unsigned long count, | ||
200 | u64 *max_size, | ||
201 | int *reset_type); | ||
180 | 202 | ||
181 | /* | 203 | /* |
182 | * EFI Configuration Table and GUID definitions | 204 | * EFI Configuration Table and GUID definitions |
@@ -211,6 +233,9 @@ typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_siz | |||
211 | #define UV_SYSTEM_TABLE_GUID \ | 233 | #define UV_SYSTEM_TABLE_GUID \ |
212 | EFI_GUID( 0x3b13a7d4, 0x633e, 0x11dd, 0x93, 0xec, 0xda, 0x25, 0x56, 0xd8, 0x95, 0x93 ) | 234 | EFI_GUID( 0x3b13a7d4, 0x633e, 0x11dd, 0x93, 0xec, 0xda, 0x25, 0x56, 0xd8, 0x95, 0x93 ) |
213 | 235 | ||
236 | #define LINUX_EFI_CRASH_GUID \ | ||
237 | EFI_GUID( 0xcfc8fc79, 0xbe2e, 0x4ddc, 0x97, 0xf0, 0x9f, 0x98, 0xbf, 0xe2, 0x98, 0xa0 ) | ||
238 | |||
214 | typedef struct { | 239 | typedef struct { |
215 | efi_guid_t guid; | 240 | efi_guid_t guid; |
216 | unsigned long table; | 241 | unsigned long table; |
@@ -218,6 +243,13 @@ typedef struct { | |||
218 | 243 | ||
219 | #define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL) | 244 | #define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL) |
220 | 245 | ||
246 | #define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30)) | ||
247 | #define EFI_2_20_SYSTEM_TABLE_REVISION ((2 << 16) | (20)) | ||
248 | #define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | (10)) | ||
249 | #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00)) | ||
250 | #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10)) | ||
251 | #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02)) | ||
252 | |||
221 | typedef struct { | 253 | typedef struct { |
222 | efi_table_hdr_t hdr; | 254 | efi_table_hdr_t hdr; |
223 | unsigned long fw_vendor; /* physical addr of CHAR16 vendor string */ | 255 | unsigned long fw_vendor; /* physical addr of CHAR16 vendor string */ |
@@ -250,6 +282,7 @@ struct efi_memory_map { | |||
250 | */ | 282 | */ |
251 | extern struct efi { | 283 | extern struct efi { |
252 | efi_system_table_t *systab; /* EFI system table */ | 284 | efi_system_table_t *systab; /* EFI system table */ |
285 | unsigned int runtime_version; /* Runtime services version */ | ||
253 | unsigned long mps; /* MPS table */ | 286 | unsigned long mps; /* MPS table */ |
254 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ | 287 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ |
255 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ | 288 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ |
@@ -266,6 +299,9 @@ extern struct efi { | |||
266 | efi_get_variable_t *get_variable; | 299 | efi_get_variable_t *get_variable; |
267 | efi_get_next_variable_t *get_next_variable; | 300 | efi_get_next_variable_t *get_next_variable; |
268 | efi_set_variable_t *set_variable; | 301 | efi_set_variable_t *set_variable; |
302 | efi_query_variable_info_t *query_variable_info; | ||
303 | efi_update_capsule_t *update_capsule; | ||
304 | efi_query_capsule_caps_t *query_capsule_caps; | ||
269 | efi_get_next_high_mono_count_t *get_next_high_mono_count; | 305 | efi_get_next_high_mono_count_t *get_next_high_mono_count; |
270 | efi_reset_system_t *reset_system; | 306 | efi_reset_system_t *reset_system; |
271 | efi_set_virtual_address_map_t *set_virtual_address_map; | 307 | efi_set_virtual_address_map_t *set_virtual_address_map; |
@@ -426,6 +462,8 @@ struct efivars { | |||
426 | struct kset *kset; | 462 | struct kset *kset; |
427 | struct bin_attribute *new_var, *del_var; | 463 | struct bin_attribute *new_var, *del_var; |
428 | const struct efivar_operations *ops; | 464 | const struct efivar_operations *ops; |
465 | struct efivar_entry *walk_entry; | ||
466 | struct pstore_info efi_pstore_info; | ||
429 | }; | 467 | }; |
430 | 468 | ||
431 | int register_efivars(struct efivars *efivars, | 469 | int register_efivars(struct efivars *efivars, |