Merge tag 'v3.9' into efi-for-tip2
Resolve conflicts for Ingo. Conflicts: drivers/firmware/Kconfig drivers/firmware/efivars.c Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
@@ -333,6 +333,7 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
|
||||
unsigned long count,
|
||||
u64 *max_size,
|
||||
int *reset_type);
|
||||
typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size);
|
||||
|
||||
/*
|
||||
* EFI Configuration Table and GUID definitions
|
||||
@@ -575,9 +576,15 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos
|
||||
#ifdef CONFIG_X86
|
||||
extern void efi_late_init(void);
|
||||
extern void efi_free_boot_services(void);
|
||||
extern efi_status_t efi_query_variable_store(u32 attributes, unsigned long size);
|
||||
#else
|
||||
static inline void efi_late_init(void) {}
|
||||
static inline void efi_free_boot_services(void) {}
|
||||
|
||||
static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
|
||||
extern u64 efi_get_iobase (void);
|
||||
@@ -725,51 +732,6 @@ static inline void memrange_efi_to_native(u64 *addr, u64 *npages)
|
||||
*addr &= PAGE_MASK;
|
||||
}
|
||||
|
||||
/* Return the number of unicode characters in data */
|
||||
static inline unsigned long
|
||||
utf16_strnlen(efi_char16_t *s, size_t maxlength)
|
||||
{
|
||||
unsigned long length = 0;
|
||||
|
||||
while (*s++ != 0 && length < maxlength)
|
||||
length++;
|
||||
return length;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
utf16_strlen(efi_char16_t *s)
|
||||
{
|
||||
return utf16_strnlen(s, ~0UL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the number of bytes is the length of this string
|
||||
* Note: this is NOT the same as the number of unicode characters
|
||||
*/
|
||||
static inline unsigned long
|
||||
utf16_strsize(efi_char16_t *data, unsigned long maxlength)
|
||||
{
|
||||
return utf16_strnlen(data, maxlength/sizeof(efi_char16_t)) * sizeof(efi_char16_t);
|
||||
}
|
||||
|
||||
static inline int
|
||||
utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len)
|
||||
{
|
||||
while (1) {
|
||||
if (len == 0)
|
||||
return 0;
|
||||
if (*a < *b)
|
||||
return -1;
|
||||
if (*a > *b)
|
||||
return 1;
|
||||
if (*a == 0) /* implies *b == 0 */
|
||||
return 0;
|
||||
a++;
|
||||
b++;
|
||||
len--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* EFI Variable support.
|
||||
*
|
||||
@@ -781,7 +743,7 @@ struct efivar_operations {
|
||||
efi_get_variable_t *get_variable;
|
||||
efi_get_next_variable_t *get_next_variable;
|
||||
efi_set_variable_t *set_variable;
|
||||
efi_query_variable_info_t *query_variable_info;
|
||||
efi_query_variable_store_t *query_variable_store;
|
||||
};
|
||||
|
||||
struct efivars {
|
||||
|
Reference in New Issue
Block a user