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

Commit b9394d8a 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 x86/efi changes from Peter Anvin:
 "The bulk of these changes are cleaning up the efivars handling and
  breaking it up into a tree of files.  There are a number of fixes as
  well.

  The entire changeset is pretty big, but most of it is code movement.

  Several of these commits are quite new; the history got very messed up
  due to a mismerge with the urgent changes for rc8 which completely
  broke IA64, and so Ingo requested that we rebase it to straighten it
  out."

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: remove "kfree(NULL)"
  efi: locking fix in efivar_entry_set_safe()
  efi, pstore: Read data from variable store before memcpy()
  efi, pstore: Remove entry from list when erasing
  efi, pstore: Initialise 'entry' before iterating
  efi: split efisubsystem from efivars
  efivarfs: Move to fs/efivarfs
  efivars: Move pstore code into the new EFI directory
  efivars: efivar_entry API
  efivars: Keep a private global pointer to efivars
  efi: move utf16 string functions to efi.h
  x86, efi: Make efi_memblock_x86_reserve_range more readable
  efivarfs: convert to use simple_open()
parents 126de6b2 7b2dd6d2
Loading
Loading
Loading
Loading
+11 −2
Original line number Original line Diff line number Diff line
@@ -3025,9 +3025,18 @@ F: arch/ia64/kernel/efi.c
F:	arch/x86/boot/compressed/eboot.[ch]
F:	arch/x86/boot/compressed/eboot.[ch]
F:	arch/x86/include/asm/efi.h
F:	arch/x86/include/asm/efi.h
F:	arch/x86/platform/efi/*
F:	arch/x86/platform/efi/*
F:	drivers/firmware/efivars.c
F:	drivers/firmware/efi/*
F:	include/linux/efi*.h
F:	include/linux/efi*.h


EFI VARIABLE FILESYSTEM
M:	Matthew Garrett <matthew.garrett@nebula.com>
M:	Jeremy Kerr <jk@ozlabs.org>
M:	Matt Fleming <matt.fleming@intel.com>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
L:	linux-efi@vger.kernel.org
S:	Maintained
F:	fs/efivarfs/

EFIFB FRAMEBUFFER DRIVER
EFIFB FRAMEBUFFER DRIVER
L:	linux-fbdev@vger.kernel.org
L:	linux-fbdev@vger.kernel.org
M:	Peter Jones <pjones@redhat.com>
M:	Peter Jones <pjones@redhat.com>
@@ -6391,7 +6400,7 @@ S: Maintained
T:	git git://git.infradead.org/users/cbou/linux-pstore.git
T:	git git://git.infradead.org/users/cbou/linux-pstore.git
F:	fs/pstore/
F:	fs/pstore/
F:	include/linux/pstore*
F:	include/linux/pstore*
F:	drivers/firmware/efivars.c
F:	drivers/firmware/efi/efi-pstore.c
F:	drivers/acpi/apei/erst.c
F:	drivers/acpi/apei/erst.c


PTP HARDWARE CLOCK SUPPORT
PTP HARDWARE CLOCK SUPPORT
+1 −0
Original line number Original line Diff line number Diff line
@@ -110,6 +110,7 @@ config DMI


config EFI
config EFI
	bool
	bool
	select UCS2_STRING
	default y
	default y


config SCHED_OMIT_FRAME_POINTER
config SCHED_OMIT_FRAME_POINTER
+10 −9
Original line number Original line Diff line number Diff line
@@ -453,24 +453,25 @@ static void __init do_add_efi_memmap(void)


int __init efi_memblock_x86_reserve_range(void)
int __init efi_memblock_x86_reserve_range(void)
{
{
	struct efi_info *e = &boot_params.efi_info;
	unsigned long pmap;
	unsigned long pmap;


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
	/* Can't handle data above 4GB at this time */
	/* Can't handle data above 4GB at this time */
	if (boot_params.efi_info.efi_memmap_hi) {
	if (e->efi_memmap_hi) {
		pr_err("Memory map is above 4GB, disabling EFI.\n");
		pr_err("Memory map is above 4GB, disabling EFI.\n");
		return -EINVAL;
		return -EINVAL;
	}
	}
	pmap = boot_params.efi_info.efi_memmap;
	pmap =  e->efi_memmap;
#else
#else
	pmap = (boot_params.efi_info.efi_memmap |
	pmap = (e->efi_memmap |	((__u64)e->efi_memmap_hi << 32));
		((__u64)boot_params.efi_info.efi_memmap_hi<<32));
#endif
#endif
	memmap.phys_map		= (void *)pmap;
	memmap.phys_map		= (void *)pmap;
	memmap.nr_map = boot_params.efi_info.efi_memmap_size /
	memmap.nr_map		= e->efi_memmap_size /
		boot_params.efi_info.efi_memdesc_size;
				  e->efi_memdesc_size;
	memmap.desc_version = boot_params.efi_info.efi_memdesc_version;
	memmap.desc_size	= e->efi_memdesc_size;
	memmap.desc_size = boot_params.efi_info.efi_memdesc_size;
	memmap.desc_version	= e->efi_memdesc_version;

	memblock_reserve(pmap, memmap.nr_map * memmap.desc_size);
	memblock_reserve(pmap, memmap.nr_map * memmap.desc_size);


	return 0;
	return 0;
+1 −36
Original line number Original line Diff line number Diff line
@@ -36,42 +36,6 @@ config FIRMWARE_MEMMAP


      See also Documentation/ABI/testing/sysfs-firmware-memmap.
      See also Documentation/ABI/testing/sysfs-firmware-memmap.


config EFI_VARS
	tristate "EFI Variable Support via sysfs"
	depends on EFI
	select UCS2_STRING
	default n
	help
	  If you say Y here, you are able to get EFI (Extensible Firmware
	  Interface) variable information via sysfs.  You may read,
	  write, create, and destroy EFI variables through this interface.

	  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:
	  <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>

config EFI_VARS_PSTORE
	bool "Register efivars backend for pstore"
	depends on EFI_VARS && PSTORE
	default y
	help
	  Say Y here to enable use efivars as a backend to pstore. This
	  will allow writing console messages, crash dumps, or anything
	  else supported by pstore to EFI variables.

config EFI_VARS_PSTORE_DEFAULT_DISABLE
	bool "Disable using efivars as a pstore backend by default"
	depends on EFI_VARS_PSTORE
	default n
	help
	  Saying Y here will disable the use of efivars as a storage
	  backend for pstore by default. This setting can be overridden
	  using the efivars module's pstore_disable parameter.

config EFI_PCDP
config EFI_PCDP
	bool "Console device selection via EFI PCDP or HCDP table"
	bool "Console device selection via EFI PCDP or HCDP table"
	depends on ACPI && EFI && IA64
	depends on ACPI && EFI && IA64
@@ -165,5 +129,6 @@ config ISCSI_IBFT
	  Otherwise, say N.
	  Otherwise, say N.


source "drivers/firmware/google/Kconfig"
source "drivers/firmware/google/Kconfig"
source "drivers/firmware/efi/Kconfig"


endmenu
endmenu
+1 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,6 @@
obj-$(CONFIG_DMI)		+= dmi_scan.o
obj-$(CONFIG_DMI)		+= dmi_scan.o
obj-$(CONFIG_DMI_SYSFS)		+= dmi-sysfs.o
obj-$(CONFIG_DMI_SYSFS)		+= dmi-sysfs.o
obj-$(CONFIG_EDD)		+= edd.o
obj-$(CONFIG_EDD)		+= edd.o
obj-$(CONFIG_EFI_VARS)		+= efivars.o
obj-$(CONFIG_EFI_PCDP)		+= pcdp.o
obj-$(CONFIG_EFI_PCDP)		+= pcdp.o
obj-$(CONFIG_DELL_RBU)          += dell_rbu.o
obj-$(CONFIG_DELL_RBU)          += dell_rbu.o
obj-$(CONFIG_DCDBAS)		+= dcdbas.o
obj-$(CONFIG_DCDBAS)		+= dcdbas.o
@@ -14,3 +13,4 @@ obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o
obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o


obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
obj-$(CONFIG_GOOGLE_FIRMWARE)	+= google/
obj-$(CONFIG_EFI)		+= efi/
Loading