summaryrefslogtreecommitdiff
path: root/arch/x86/platform/efi/efi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-01 15:10:25 +0200
committerIngo Molnar <mingo@kernel.org>2015-04-01 15:10:25 +0200
commit84a87c628a12f95d8b0c86cc7b8edb28ea5edf90 (patch)
tree320a9ecbea3e7899dd933e333d0fb64a7d5b3b11 /arch/x86/platform/efi/efi.c
parente42391cd048809d903291d07f86ed3934ce138e9 (diff)
parenta643375f4b175569bc3c03c7a3e758f845c1ccd9 (diff)
downloadlinux-84a87c628a12f95d8b0c86cc7b8edb28ea5edf90.tar.gz
linux-84a87c628a12f95d8b0c86cc7b8edb28ea5edf90.tar.bz2
linux-84a87c628a12f95d8b0c86cc7b8edb28ea5edf90.zip
Merge tag 'efi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into core/efi
Pull EFI updates from Matt Fleming: - Fixes and cleanups for SMBIOS 3.0 DMI code. (Ivan Khoronzhuk) - A new efi=debug command line option that enables debug output in the EFI boot stub and results in less verbose EFI memory map output by default. (Borislav Petkov) - Disable interrupts around EFI calls and use a more standard page table saving and restoring idiom when making EFI calls. (Ingo Molnar) - Reduce the number of memory allocations performed when allocating the FDT in EFI boot stub by retrieving size from the FDT header in the EFI config table. (Ard Biesheuvel) Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/platform/efi/efi.c')
-rw-r--r--arch/x86/platform/efi/efi.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index dbc8627a5cdf..02744df576d5 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -85,12 +85,20 @@ static efi_status_t __init phys_efi_set_virtual_address_map(
efi_memory_desc_t *virtual_map)
{
efi_status_t status;
+ unsigned long flags;
+ pgd_t *save_pgd;
- efi_call_phys_prolog();
+ save_pgd = efi_call_phys_prolog();
+
+ /* Disable interrupts around EFI calls: */
+ local_irq_save(flags);
status = efi_call_phys(efi_phys.set_virtual_address_map,
memory_map_size, descriptor_size,
descriptor_version, virtual_map);
- efi_call_phys_epilog();
+ local_irq_restore(flags);
+
+ efi_call_phys_epilog(save_pgd);
+
return status;
}
@@ -491,7 +499,8 @@ void __init efi_init(void)
if (efi_memmap_init())
return;
- print_efi_memmap();
+ if (efi_enabled(EFI_DBG))
+ print_efi_memmap();
}
void __init efi_late_init(void)
@@ -939,6 +948,8 @@ static int __init arch_parse_efi_cmdline(char *str)
{
if (parse_option_str(str, "old_map"))
set_bit(EFI_OLD_MEMMAP, &efi.flags);
+ if (parse_option_str(str, "debug"))
+ set_bit(EFI_DBG, &efi.flags);
return 0;
}