aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-20 21:38:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-20 21:38:48 -0400
commitdb93f8b42036bd60d95e8d28ee98b308d5846b9f (patch)
treee98018a262346250f9bf8ff68b80132a94fd18ab /include
parent8c3a13c84b90f2551b646ff2956ac68bef69a810 (diff)
parentc0a9f451e4e7ecd2ad1a6c27ea5c31d0226bdddf (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Peter Anvin: "Three groups of fixes: 1. Make sure we don't execute the early microcode patching if family < 6, since it would touch MSRs which don't exist on those families, causing crashes. 2. The Xen partial emulation of HyperV can be dealt with more gracefully than just disabling the driver. 3. More EFI variable space magic. In particular, variables hidden from runtime code need to be taken into account too." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, microcode: Verify the family before dispatching microcode patching x86, hyperv: Handle Xen emulation of Hyper-V more gracefully x86,efi: Implement efi_no_storage_paranoia parameter efi: Export efi_query_variable_store() for efivars.ko x86/Kconfig: Make EFI select UCS2_STRING efi: Distinguish between "remaining space" and actually used space efi: Pass boot services variable info to runtime code Move utf16 functions to kernel core and rename x86,efi: Check max_size only if it is non-zero. x86, efivars: firmware bug workarounds should be in platform code
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h9
-rw-r--r--include/linux/ucs2_string.h14
2 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 9bf2f1fcae27..3d7df3d32c66 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -333,6 +333,7 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
333 unsigned long count, 333 unsigned long count,
334 u64 *max_size, 334 u64 *max_size,
335 int *reset_type); 335 int *reset_type);
336typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size);
336 337
337/* 338/*
338 * EFI Configuration Table and GUID definitions 339 * EFI Configuration Table and GUID definitions
@@ -575,9 +576,15 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos
575#ifdef CONFIG_X86 576#ifdef CONFIG_X86
576extern void efi_late_init(void); 577extern void efi_late_init(void);
577extern void efi_free_boot_services(void); 578extern void efi_free_boot_services(void);
579extern efi_status_t efi_query_variable_store(u32 attributes, unsigned long size);
578#else 580#else
579static inline void efi_late_init(void) {} 581static inline void efi_late_init(void) {}
580static inline void efi_free_boot_services(void) {} 582static inline void efi_free_boot_services(void) {}
583
584static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)
585{
586 return EFI_SUCCESS;
587}
581#endif 588#endif
582extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); 589extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
583extern u64 efi_get_iobase (void); 590extern u64 efi_get_iobase (void);
@@ -731,7 +738,7 @@ struct efivar_operations {
731 efi_get_variable_t *get_variable; 738 efi_get_variable_t *get_variable;
732 efi_get_next_variable_t *get_next_variable; 739 efi_get_next_variable_t *get_next_variable;
733 efi_set_variable_t *set_variable; 740 efi_set_variable_t *set_variable;
734 efi_query_variable_info_t *query_variable_info; 741 efi_query_variable_store_t *query_variable_store;
735}; 742};
736 743
737struct efivars { 744struct efivars {
diff --git a/include/linux/ucs2_string.h b/include/linux/ucs2_string.h
new file mode 100644
index 000000000000..cbb20afdbc01
--- /dev/null
+++ b/include/linux/ucs2_string.h
@@ -0,0 +1,14 @@
1#ifndef _LINUX_UCS2_STRING_H_
2#define _LINUX_UCS2_STRING_H_
3
4#include <linux/types.h> /* for size_t */
5#include <linux/stddef.h> /* for NULL */
6
7typedef u16 ucs2_char_t;
8
9unsigned long ucs2_strnlen(const ucs2_char_t *s, size_t maxlength);
10unsigned long ucs2_strlen(const ucs2_char_t *s);
11unsigned long ucs2_strsize(const ucs2_char_t *data, unsigned long maxlength);
12int ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len);
13
14#endif /* _LINUX_UCS2_STRING_H_ */