Skip to content

Commit

Permalink
Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/tip/tip

Pull EFI updates from Ingo Molnar:
 "The main changes in this cycle were:

   - Cleanup of the GOP [graphics output] handling code in the EFI stub

   - Complete refactoring of the mixed mode handling in the x86 EFI stub

   - Overhaul of the x86 EFI boot/runtime code

   - Increase robustness for mixed mode code

   - Add the ability to disable DMA at the root port level in the EFI
     stub

   - Get rid of RWX mappings in the EFI memory map and page tables,
     where possible

   - Move the support code for the old EFI memory mapping style into its
     only user, the SGI UV1+ support code.

   - plus misc fixes, updates, smaller cleanups.

  ... and due to interactions with the RWX changes, another round of PAT
  cleanups make a guest appearance via the EFI tree - with no side
  effects intended"

* 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits)
  efi/x86: Disable instrumentation in the EFI runtime handling code
  efi/libstub/x86: Fix EFI server boot failure
  efi/x86: Disallow efi=old_map in mixed mode
  x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld
  efi/x86: avoid KASAN false positives when accessing the 1: 1 mapping
  efi: Fix handling of multiple efi_fake_mem= entries
  efi: Fix efi_memmap_alloc() leaks
  efi: Add tracking for dynamically allocated memmaps
  efi: Add a flags parameter to efi_memory_map
  efi: Fix comment for efi_mem_type() wrt absent physical addresses
  efi/arm: Defer probe of PCIe backed efifb on DT systems
  efi/x86: Limit EFI old memory map to SGI UV machines
  efi/x86: Avoid RWX mappings for all of DRAM
  efi/x86: Don't map the entire kernel text RW for mixed mode
  x86/mm: Fix NX bit clearing issue in kernel_map_pages_in_pgd
  efi/libstub/x86: Fix unused-variable warning
  efi/libstub/x86: Use mandatory 16-byte stack alignment in mixed mode
  efi/libstub/x86: Use const attribute for efi_is_64bit()
  efi: Allow disabling PCI busmastering on bridges during boot
  efi/x86: Allow translating 64-bit arguments for mixed mode calls
  ...
  • Loading branch information
torvalds committed Jan 28, 2020
2 parents d99391e + ac6119e commit 634cd4b
Show file tree
Hide file tree
Showing 109 changed files with 2,650 additions and 2,892 deletions.
10 changes: 7 additions & 3 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1165,10 +1165,10 @@

efi= [EFI]
Format: { "old_map", "nochunk", "noruntime", "debug",
"nosoftreserve" }
"nosoftreserve", "disable_early_pci_dma",
"no_disable_early_pci_dma" }
old_map [X86-64]: switch to the old ioremap-based EFI
runtime services mapping. 32-bit still uses this one by
default.
runtime services mapping. [Needs CONFIG_X86_UV=y]
nochunk: disable reading files in "chunks" in the EFI
boot stub, as chunking can cause problems with some
firmware implementations.
Expand All @@ -1180,6 +1180,10 @@
claim. Specify efi=nosoftreserve to disable this
reservation and treat the memory by its base type
(i.e. EFI_CONVENTIONAL_MEMORY / "System RAM").
disable_early_pci_dma: Disable the busmaster bit on all
PCI bridges while in the EFI boot stub
no_disable_early_pci_dma: Leave the busmaster bit set
on all PCI bridges while in the EFI boot stub

efi_no_storage_paranoia [EFI; X86]
Using this parameter you can use more than 50% of
Expand Down
4 changes: 4 additions & 0 deletions arch/alpha/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_ALPHA_VMALLOC_H
#define _ASM_ALPHA_VMALLOC_H

#endif /* _ASM_ALPHA_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/arc/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_ARC_VMALLOC_H
#define _ASM_ARC_VMALLOC_H

#endif /* _ASM_ARC_VMALLOC_H */
17 changes: 7 additions & 10 deletions arch/arm/include/asm/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,16 @@ void efi_virtmap_unload(void);

/* arch specific definitions used by the stub code */

#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__)
#define __efi_call_early(f, ...) f(__VA_ARGS__)
#define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__)
#define efi_is_64bit() (false)
#define efi_bs_call(func, ...) efi_system_table()->boottime->func(__VA_ARGS__)
#define efi_rt_call(func, ...) efi_system_table()->runtime->func(__VA_ARGS__)
#define efi_is_native() (true)

#define efi_table_attr(table, attr, instance) \
((table##_t *)instance)->attr
#define efi_table_attr(inst, attr) (inst->attr)

#define efi_call_proto(protocol, f, instance, ...) \
((protocol##_t *)instance)->f(instance, ##__VA_ARGS__)
#define efi_call_proto(inst, func, ...) inst->func(inst, ##__VA_ARGS__)

struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg);
void free_screen_info(efi_system_table_t *sys_table, struct screen_info *si);
struct screen_info *alloc_screen_info(void);
void free_screen_info(struct screen_info *si);

static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
{
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_ARM_VMALLOC_H
#define _ASM_ARM_VMALLOC_H

#endif /* _ASM_ARM_VMALLOC_H */
16 changes: 6 additions & 10 deletions arch/arm64/include/asm/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,17 @@ static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base,
return (image_addr & ~(SZ_1G - 1UL)) + (1UL << (VA_BITS_MIN - 1));
}

#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__)
#define __efi_call_early(f, ...) f(__VA_ARGS__)
#define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__)
#define efi_is_64bit() (true)
#define efi_bs_call(func, ...) efi_system_table()->boottime->func(__VA_ARGS__)
#define efi_rt_call(func, ...) efi_system_table()->runtime->func(__VA_ARGS__)
#define efi_is_native() (true)

#define efi_table_attr(table, attr, instance) \
((table##_t *)instance)->attr
#define efi_table_attr(inst, attr) (inst->attr)

#define efi_call_proto(protocol, f, instance, ...) \
((protocol##_t *)instance)->f(instance, ##__VA_ARGS__)
#define efi_call_proto(inst, func, ...) inst->func(inst, ##__VA_ARGS__)

#define alloc_screen_info(x...) &screen_info

static inline void free_screen_info(efi_system_table_t *sys_table_arg,
struct screen_info *si)
static inline void free_screen_info(struct screen_info *si)
{
}

Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_ARM64_VMALLOC_H
#define _ASM_ARM64_VMALLOC_H

#endif /* _ASM_ARM64_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/c6x/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_C6X_VMALLOC_H
#define _ASM_C6X_VMALLOC_H

#endif /* _ASM_C6X_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/csky/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_CSKY_VMALLOC_H
#define _ASM_CSKY_VMALLOC_H

#endif /* _ASM_CSKY_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/h8300/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_H8300_VMALLOC_H
#define _ASM_H8300_VMALLOC_H

#endif /* _ASM_H8300_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/hexagon/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_HEXAGON_VMALLOC_H
#define _ASM_HEXAGON_VMALLOC_H

#endif /* _ASM_HEXAGON_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/ia64/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_IA64_VMALLOC_H
#define _ASM_IA64_VMALLOC_H

#endif /* _ASM_IA64_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/m68k/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_M68K_VMALLOC_H
#define _ASM_M68K_VMALLOC_H

#endif /* _ASM_M68K_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/microblaze/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_MICROBLAZE_VMALLOC_H
#define _ASM_MICROBLAZE_VMALLOC_H

#endif /* _ASM_MICROBLAZE_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/mips/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_MIPS_VMALLOC_H
#define _ASM_MIPS_VMALLOC_H

#endif /* _ASM_MIPS_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/nds32/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_NDS32_VMALLOC_H
#define _ASM_NDS32_VMALLOC_H

#endif /* _ASM_NDS32_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/nios2/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_NIOS2_VMALLOC_H
#define _ASM_NIOS2_VMALLOC_H

#endif /* _ASM_NIOS2_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/openrisc/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_OPENRISC_VMALLOC_H
#define _ASM_OPENRISC_VMALLOC_H

#endif /* _ASM_OPENRISC_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/parisc/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_PARISC_VMALLOC_H
#define _ASM_PARISC_VMALLOC_H

#endif /* _ASM_PARISC_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/powerpc/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_POWERPC_VMALLOC_H
#define _ASM_POWERPC_VMALLOC_H

#endif /* _ASM_POWERPC_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/riscv/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_RISCV_VMALLOC_H
#define _ASM_RISCV_VMALLOC_H

#endif /* _ASM_RISCV_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/s390/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_S390_VMALLOC_H
#define _ASM_S390_VMALLOC_H

#endif /* _ASM_S390_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/sh/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_SH_VMALLOC_H
#define _ASM_SH_VMALLOC_H

#endif /* _ASM_SH_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/sparc/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_SPARC_VMALLOC_H
#define _ASM_SPARC_VMALLOC_H

#endif /* _ASM_SPARC_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/um/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_UM_VMALLOC_H
#define _ASM_UM_VMALLOC_H

#endif /* _ASM_UM_VMALLOC_H */
4 changes: 4 additions & 0 deletions arch/unicore32/include/asm/vmalloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef _ASM_UNICORE32_VMALLOC_H
#define _ASM_UNICORE32_VMALLOC_H

#endif /* _ASM_UNICORE32_VMALLOC_H */
13 changes: 7 additions & 6 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ config X86_CPA_STATISTICS
bool "Enable statistic for Change Page Attribute"
depends on DEBUG_FS
---help---
Expose statistics about the Change Page Attribute mechanims, which
Expose statistics about the Change Page Attribute mechanism, which
helps to determine the effectiveness of preserving large and huge
page mappings when mapping protections are changed.

Expand Down Expand Up @@ -1992,11 +1992,12 @@ config EFI
platforms.

config EFI_STUB
bool "EFI stub support"
depends on EFI && !X86_USE_3DNOW
select RELOCATABLE
---help---
This kernel feature allows a bzImage to be loaded directly
bool "EFI stub support"
depends on EFI && !X86_USE_3DNOW
depends on $(cc-option,-mabi=ms) || X86_32
select RELOCATABLE
---help---
This kernel feature allows a bzImage to be loaded directly
by EFI firmware without the use of a bootloader.

See Documentation/admin-guide/efi-stub.rst for more information.
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE

SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))

sed-zoffset := -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(startup_32\|startup_64\|efi32_stub_entry\|efi64_stub_entry\|efi_pe_entry\|input_data\|kernel_info\|_end\|_ehead\|_text\|z_.*\)$$/\#define ZO_\2 0x\1/p'
sed-zoffset := -e 's/^\([0-9a-fA-F]*\) [a-zA-Z] \(startup_32\|startup_64\|efi32_stub_entry\|efi64_stub_entry\|efi_pe_entry\|input_data\|kernel_info\|_end\|_ehead\|_text\|z_.*\)$$/\#define ZO_\2 0x\1/p'

quiet_cmd_zoffset = ZOFFSET $@
cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o

$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone

vmlinux-objs-$(CONFIG_EFI_STUB) += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o \
vmlinux-objs-$(CONFIG_EFI_STUB) += $(obj)/eboot.o \
$(objtree)/drivers/firmware/efi/libstub/lib.a
vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o

Expand Down
Loading

0 comments on commit 634cd4b

Please sign in to comment.