diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 11:16:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 11:16:29 -0400 |
commit | 046f153343e33dcad1be7f6249ea6ff1c6fd9b58 (patch) | |
tree | 46da03ea84e1a4fe8eff53891332e715cbf31f3e /include/linux | |
parent | a0abcf2e8f8017051830f738ac1bf5ef42703243 (diff) | |
parent | e33655a386ed3b26ad36fb97a47ebb1c2ca1e928 (diff) |
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull x86 EFI updates from Peter Anvin:
"A collection of EFI changes. The perhaps most important one is to
fully save and restore the FPU state around each invocation of EFI
runtime, and to not choke on non-ASCII characters in the boot stub"
* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efivars: Add compatibility code for compat tasks
efivars: Refactor sanity checking code into separate function
efivars: Stop passing a struct argument to efivar_validate()
efivars: Check size of user object
efivars: Use local variables instead of a pointer dereference
x86/efi: Save and restore FPU context around efi_calls (i386)
x86/efi: Save and restore FPU context around efi_calls (x86_64)
x86/efi: Implement a __efi_call_virt macro
x86, fpu: Extend the use of static_cpu_has_safe
x86/efi: Delete most of the efi_call* macros
efi: x86: Handle arbitrary Unicode characters
efi: Add get_dram_base() helper function
efi: Add shared printk wrapper for consistent prefixing
efi: create memory map iteration helper
efi: efi-stub-helper cleanup
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/efi.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 6c100ff0cae4..6a4d8e27d1d7 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -863,6 +863,12 @@ extern int efi_set_rtc_mmss(const struct timespec *now); | |||
863 | extern void efi_reserve_boot_services(void); | 863 | extern void efi_reserve_boot_services(void); |
864 | extern struct efi_memory_map memmap; | 864 | extern struct efi_memory_map memmap; |
865 | 865 | ||
866 | /* Iterate through an efi_memory_map */ | ||
867 | #define for_each_efi_memory_desc(m, md) \ | ||
868 | for ((md) = (m)->map; \ | ||
869 | (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ | ||
870 | (md) = (void *)(md) + (m)->desc_size) | ||
871 | |||
866 | /** | 872 | /** |
867 | * efi_range_is_wc - check the WC bit on an address range | 873 | * efi_range_is_wc - check the WC bit on an address range |
868 | * @start: starting kvirt address | 874 | * @start: starting kvirt address |
@@ -1033,8 +1039,10 @@ struct efivars { | |||
1033 | * and we use a page for reading/writing. | 1039 | * and we use a page for reading/writing. |
1034 | */ | 1040 | */ |
1035 | 1041 | ||
1042 | #define EFI_VAR_NAME_LEN 1024 | ||
1043 | |||
1036 | struct efi_variable { | 1044 | struct efi_variable { |
1037 | efi_char16_t VariableName[1024/sizeof(efi_char16_t)]; | 1045 | efi_char16_t VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)]; |
1038 | efi_guid_t VendorGuid; | 1046 | efi_guid_t VendorGuid; |
1039 | unsigned long DataSize; | 1047 | unsigned long DataSize; |
1040 | __u8 Data[1024]; | 1048 | __u8 Data[1024]; |
@@ -1116,7 +1124,7 @@ int efivar_entry_iter(int (*func)(struct efivar_entry *, void *), | |||
1116 | struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid, | 1124 | struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid, |
1117 | struct list_head *head, bool remove); | 1125 | struct list_head *head, bool remove); |
1118 | 1126 | ||
1119 | bool efivar_validate(struct efi_variable *var, u8 *data, unsigned long len); | 1127 | bool efivar_validate(efi_char16_t *var_name, u8 *data, unsigned long len); |
1120 | 1128 | ||
1121 | extern struct work_struct efivar_work; | 1129 | extern struct work_struct efivar_work; |
1122 | void efivar_run_worker(void); | 1130 | void efivar_run_worker(void); |