Skip to contentSkip to conversation

EFI updates for 4.15

GIT PULL Thomas Gleixner 1 participant 1 message Jan 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest efi-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-urgent-for-linus

This update contains:

- A fix for a add_efi_memmap parameter regression which ensures that the parameter is parsed before it is used.

- Reinstate the virtual capsule mapping as the cached copy turned out to break Quark and other things

- Remove Matt Fleming as EFI co-maintainer. He stepped back a few days ago. Thanks Matt for all your great work!

Thanks,

tglx

------------------>
Ard Biesheuvel (1):
efi/capsule-loader: Reinstate virtual capsule mapping

Dave Young (1):
x86/efi: Fix kernel param add_efi_memmap regression

Matt Fleming (1):
MAINTAINERS: Remove Matt Fleming as EFI co-maintainer

 MAINTAINERS                           |  7 +++---
 arch/x86/kernel/setup.c               |  5 ++--
 arch/x86/platform/efi/quirks.c        | 13 +++++++++-
 drivers/firmware/efi/capsule-loader.c | 45 ++++++++++++++++++++++++++++-------
 include/linux/efi.h                   |  4 +++-
 5 files changed, 57 insertions(+), 17 deletions(-)
MAINTAINERS +3 -4
index b46c9cea5ae5..95c3fa1f520f 100644
@@ -5149,15 +5149,15 @@ F:	sound/usb/misc/ua101.c
 EFI TEST DRIVER
 L:	[email protected]
 M:	Ivan Hu <[email protected]>
-M:	Matt Fleming <[email protected]>
+M:	Ard Biesheuvel <[email protected]>
 S:	Maintained
 F:	drivers/firmware/efi/test/
 
 EFI VARIABLE FILESYSTEM
 M:	Matthew Garrett <[email protected]>
 M:	Jeremy Kerr <[email protected]>
-M:	Matt Fleming <[email protected]>
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
+M:	Ard Biesheuvel <[email protected]>
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
 L:	[email protected]
 S:	Maintained
 F:	fs/efivarfs/
@@ -5318,7 +5318,6 @@ S:	Supported
 F:	security/integrity/evm/
 
 EXTENSIBLE FIRMWARE INTERFACE (EFI)
-M:	Matt Fleming <[email protected]>
 M:	Ard Biesheuvel <[email protected]>
 L:	[email protected]
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
arch/x86/kernel/setup.c +2 -3
index 8af2e8d0c0a1..145810b0edf6 100644
@@ -906,9 +906,6 @@ void __init setup_arch(char **cmdline_p)
 		set_bit(EFI_BOOT, &efi.flags);
 		set_bit(EFI_64BIT, &efi.flags);
 	}
-
-	if (efi_enabled(EFI_BOOT))
-		efi_memblock_x86_reserve_range();
 #endif
 
 	x86_init.oem.arch_setup();
@@ -962,6 +959,8 @@ void __init setup_arch(char **cmdline_p)
 
 	parse_early_param();
 
+	if (efi_enabled(EFI_BOOT))
+		efi_memblock_x86_reserve_range();
 #ifdef CONFIG_MEMORY_HOTPLUG
 	/*
 	 * Memory used by the kernel cannot be hot-removed because Linux
arch/x86/platform/efi/quirks.c +12 -1
index 8a99a2e96537..5b513ccffde4 100644
@@ -592,7 +592,18 @@ static int qrk_capsule_setup_info(struct capsule_info *cap_info, void **pkbuff,
 	/*
 	 * Update the first page pointer to skip over the CSH header.
 	 */
-	cap_info->pages[0] += csh->headersize;
+	cap_info->phys[0] += csh->headersize;
+
+	/*
+	 * cap_info->capsule should point at a virtual mapping of the entire
+	 * capsule, starting at the capsule header. Our image has the Quark
+	 * security header prepended, so we cannot rely on the default vmap()
+	 * mapping created by the generic capsule code.
+	 * Given that the Quark firmware does not appear to care about the
+	 * virtual mapping, let's just point cap_info->capsule at our copy
+	 * of the capsule header.
+	 */
+	cap_info->capsule = &cap_info->header;
 
 	return 1;
 }
drivers/firmware/efi/capsule-loader.c +37 -8

91 lines not on this page · raw message

include/linux/efi.h +3 -1
index d813f7b04da7..29fdf8029cf6 100644
@@ -140,11 +140,13 @@ struct efi_boot_memmap {
 
 struct capsule_info {
 	efi_capsule_header_t	header;
+	efi_capsule_header_t	*capsule;
 	int			reset_type;
 	long			index;
 	size_t			count;
 	size_t			total_size;
-	phys_addr_t		*pages;
+	struct page		**pages;
+	phys_addr_t		*phys;
 	size_t			page_bytes_remain;
 };