Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 072bc448 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI updates from Ingo Molnar:
 "Main changes:

   - Move efivarfs from the misc filesystem section to pseudo filesystem

   - Expose firmware platform size in sysfs

   - Improve robustness of get_memory_map() by removing assumptions on
     the size of efi_memory_desc_t.

  - various cleanups and fixes

  The biggest risk is the get_memory_map() change, which changes the way
  that both the arm64 and x86 EFI boot stub build the early memory map.
  There are no known regressions with it at the moment, BYMMV"

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: Don't look for chosen@0 node on DT platforms
  firmware: efi: Remove unneeded guid unparse
  efi/libstub: Call get_memory_map() to obtain map and desc sizes
  efi: Small leak on error in runtime map code
  efi: rtc-efi: Mark UIE as unsupported
  arm64/efi: efistub: Apply __init annotation
  efi: Expose underlying UEFI firmware platform size to userland
  efi: Rename efi_guid_unparse to efi_guid_to_str
  efi: Update the URLs for efibootmgr
  fs: Make efivarfs a pseudo filesystem, built by default with EFI
parents 80f33a5f 3c01b74e
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#include <asm/efi.h>
#include <asm/sections.h>

efi_status_t handle_kernel_image(efi_system_table_t *sys_table,
efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table,
					unsigned long *image_addr,
					unsigned long *image_size,
					unsigned long *reserve_addr,
+1 −1
Original line number Diff line number Diff line
@@ -715,7 +715,7 @@ int efi_partition(struct parsed_partitions *state)
			state->parts[i + 1].flags = ADDPART_FLAG_RAID;

		info = &state->parts[i + 1].info;
		efi_guid_unparse(&ptes[i].unique_partition_guid, info->uuid);
		efi_guid_to_str(&ptes[i].unique_partition_guid, info->uuid);

		/* Naively convert UTF16-LE to 7 bits. */
		label_max = min(ARRAY_SIZE(info->volname) - 1,
+2 −2
Original line number Diff line number Diff line
@@ -12,11 +12,11 @@ config EFI_VARS

	  Note that using this driver in concert with efibootmgr requires
	  at least test release version 0.5.0-test3 or later, which is
	  available from Matt Domsch's website located at:
	  available from:
	  <http://linux.dell.com/efibootmgr/testing/efibootmgr-0.5.0-test3.tar.gz>

	  Subsequent efibootmgr releases may be found at:
	  <http://linux.dell.com/efibootmgr>
	  <http://github.com/vathpela/efibootmgr>

config EFI_VARS_PSTORE
	tristate "Register efivars backend for pstore"
+10 −7
Original line number Diff line number Diff line
@@ -115,15 +115,24 @@ EFI_ATTR_SHOW(fw_vendor);
EFI_ATTR_SHOW(runtime);
EFI_ATTR_SHOW(config_table);

static ssize_t fw_platform_size_show(struct kobject *kobj,
				     struct kobj_attribute *attr, char *buf)
{
	return sprintf(buf, "%d\n", efi_enabled(EFI_64BIT) ? 64 : 32);
}

static struct kobj_attribute efi_attr_fw_vendor = __ATTR_RO(fw_vendor);
static struct kobj_attribute efi_attr_runtime = __ATTR_RO(runtime);
static struct kobj_attribute efi_attr_config_table = __ATTR_RO(config_table);
static struct kobj_attribute efi_attr_fw_platform_size =
	__ATTR_RO(fw_platform_size);

static struct attribute *efi_subsys_attrs[] = {
	&efi_attr_systab.attr,
	&efi_attr_fw_vendor.attr,
	&efi_attr_runtime.attr,
	&efi_attr_config_table.attr,
	&efi_attr_fw_platform_size.attr,
	NULL,
};

@@ -272,15 +281,10 @@ static __init int match_config_table(efi_guid_t *guid,
				     unsigned long table,
				     efi_config_table_type_t *table_types)
{
	u8 str[EFI_VARIABLE_GUID_LEN + 1];
	int i;

	if (table_types) {
		efi_guid_unparse(guid, str);

		for (i = 0; efi_guidcmp(table_types[i].guid, NULL_GUID); i++) {
			efi_guid_unparse(&table_types[i].guid, str);

			if (!efi_guidcmp(*guid, table_types[i].guid)) {
				*(table_types[i].ptr) = table;
				pr_cont(" %s=0x%lx ",
@@ -403,8 +407,7 @@ static int __init fdt_find_uefi_params(unsigned long node, const char *uname,
	u64 val;
	int i, len;

	if (depth != 1 ||
	    (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
	if (depth != 1 || strcmp(uname, "chosen") != 0)
		return 0;

	for (i = 0; i < ARRAY_SIZE(dt_params); i++) {
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
 *   fix locking per Peter Chubb's findings
 *
 *  25 Mar 2002 - Matt Domsch <Matt_Domsch@dell.com>
 *   move uuid_unparse() to include/asm-ia64/efi.h:efi_guid_unparse()
 *   move uuid_unparse() to include/asm-ia64/efi.h:efi_guid_to_str()
 *
 *  12 Feb 2002 - Matt Domsch <Matt_Domsch@dell.com>
 *   use list_for_each_safe when deleting vars.
@@ -128,7 +128,7 @@ efivar_guid_read(struct efivar_entry *entry, char *buf)
	if (!entry || !buf)
		return 0;

	efi_guid_unparse(&var->VendorGuid, str);
	efi_guid_to_str(&var->VendorGuid, str);
	str += strlen(str);
	str += sprintf(str, "\n");

@@ -569,7 +569,7 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var)
	   private variables from another's.         */

	*(short_name + strlen(short_name)) = '-';
	efi_guid_unparse(&new_var->var.VendorGuid,
	efi_guid_to_str(&new_var->var.VendorGuid,
			 short_name + strlen(short_name));

	new_var->kobj.kset = efivars_kset;
Loading