summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-03-08 08:59:47 +0100
committerIngo Molnar <mingo@kernel.org>2020-03-08 09:23:36 +0100
commit3be5f0d286dc944dee65fdcbddfc4d314f7d4482 (patch)
treee9ae173868cc3d984aa1e916f94e5f3cef18a265 /arch/x86
parentc98a76eabbb6e7755f3d4a4c33f8fe869dda6383 (diff)
parentf0df68d5bae8825ee5b62f00af237ae82247f045 (diff)
downloadlinux-3be5f0d286dc944dee65fdcbddfc4d314f7d4482.tar.gz
linux-3be5f0d286dc944dee65fdcbddfc4d314f7d4482.tar.bz2
linux-3be5f0d286dc944dee65fdcbddfc4d314f7d4482.zip
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core
More EFI updates for v5.7 - Incorporate a stable branch with the EFI pieces of Hans's work on loading device firmware from EFI boot service memory regions Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/platform/efi/efi.c2
-rw-r--r--arch/x86/platform/efi/quirks.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index aca9bdd87bca..1aae5302501d 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -246,6 +246,7 @@ int __init efi_memblock_x86_reserve_range(void)
efi.memmap.desc_version);
memblock_reserve(pmap, efi.memmap.nr_map * efi.memmap.desc_size);
+ set_bit(EFI_PRESERVE_BS_REGIONS, &efi.flags);
return 0;
}
@@ -901,6 +902,7 @@ static void __init __efi_enter_virtual_mode(void)
goto err;
}
+ efi_check_for_embedded_firmwares();
efi_free_boot_services();
if (!efi_is_mixed())
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index b0e0161e2e8e..ce82f497ac67 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -410,6 +410,10 @@ void __init efi_free_boot_services(void)
int num_entries = 0;
void *new, *new_md;
+ /* Keep all regions for /sys/kernel/debug/efi */
+ if (efi_enabled(EFI_DBG))
+ return;
+
for_each_efi_memory_desc(md) {
unsigned long long start = md->phys_addr;
unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;