x86 fixes
Linus,
Please pull the latest x86-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus
# HEAD: 29282ac0bd6c0b0c4c893fe2c31863e50fea69f8 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into x86/urgent
This has:
- EFI revert to fix a boot regression
- early_ioremap() fix for boot failure
- KASLR fix for possible boot failures
- EFI fix for corrupted string printing
- remove a misleading EFI bootup 'failed!' error message
Unfortunately it's all rather close to the merge window.
out-of-topic modifications in x86-urgent-for-linus:
-----------------------------------------------------
drivers/firmware/efi/Makefile # 84be880560fb: Revert "efi/x86: efistub: Mo
Thanks,
Ingo
------------------>
Dave Young (1):
x86 early_ioremap: Increase FIX_BTMAPS_SLOTS to 8
Kees Cook (1):
x86/kaslr: Avoid the setup_data area when picking location
Matt Fleming (3):
Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" x86/efi: Delete misleading efi_printk() error message x86/efi: Truncate 64-bit values when calling 32-bit OutputString()
arch/x86/boot/compressed/Makefile | 3 +-- arch/x86/boot/compressed/aslr.c | 15 +++++++++++++ arch/x86/boot/compressed/eboot.c | 44 +++++++++++++++++++++++---------------- arch/x86/boot/compressed/eboot.h | 16 ++++++++++++++ arch/x86/include/asm/efi.h | 24 --------------------- arch/x86/include/asm/fixmap.h | 6 +++--- drivers/firmware/efi/Makefile | 2 +- 7 files changed, 62 insertions(+), 48 deletions(-)
arch/x86/boot/compressed/Makefile +1 -2
@@ -33,8 +33,7 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \ $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone ifeq ($(CONFIG_EFI_STUB), y) - VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o \ - $(objtree)/drivers/firmware/efi/libstub/lib.a + VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o endif $(obj)/vmlinux: $(VMLINUX_OBJS) FORCE
arch/x86/boot/compressed/aslr.c +15 -0
@@ -183,12 +183,27 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,static bool mem_avoid_overlap (struct mem_vector *img) {int i; +struct setup_data *ptr;for (i =0 ; i <MEM_AVOID_MAX ; i++) {if (mem_overlaps (img, &mem_avoid[i]))return true; } +/* Avoid all entries in the setup_data linked list. */ + ptr = (struct setup_data *)(unsigned long )real_mode->hdr.setup_data; +while (ptr) { +struct mem_vector avoid; + + avoid.start = (u64 )ptr; + avoid.size =sizeof (*ptr) + ptr->len; + +if (mem_overlaps (img, &avoid)) +return true; + + ptr = (struct setup_data *)(unsigned long )ptr->next; + } +return false; }
arch/x86/boot/compressed/eboot.c +26 -18
117 lines not on this page · raw message
arch/x86/boot/compressed/eboot.h +16 -0
@@ -103,4 +103,20 @@ struct efi_uga_draw_protocol { void *blt; }; +struct efi_config { +u64 image_handle; +u64 table; +u64 allocate_pool; +u64 allocate_pages; +u64 get_memory_map; +u64 free_pool; +u64 free_pages; +u64 locate_handle; +u64 handle_protocol; +u64 exit_boot_services; +u64 text_output; +efi_status_t (*call)(unsigned long , ...); +bool is64; +} __packed; +#endif /* BOOT_COMPRESSED_EBOOT_H */
arch/x86/include/asm/efi.h +0 -24
@@ -159,30 +159,6 @@ static inline efi_status_t efi_thunk_set_virtual_address_map( }#endif /* CONFIG_EFI_MIXED */ - -/* arch specific definitions used by the stub code */ - -struct efi_config { -u64 image_handle; -u64 table; -u64 allocate_pool; -u64 allocate_pages; -u64 get_memory_map; -u64 free_pool; -u64 free_pages; -u64 locate_handle; -u64 handle_protocol; -u64 exit_boot_services; -u64 text_output; -efi_status_t (*call)(unsigned long , ...); -bool is64; -} __packed; - -extern struct efi_config *efi_early; - -#define efi_call_early (f, ...) \ - efi_early->call(efi_early->f, __VA_ARGS__); -extern bool efi_reboot_required (void );#else
arch/x86/include/asm/fixmap.h +3 -3
@@ -106,14 +106,14 @@ enum fixed_addresses { __end_of_permanent_fixed_addresses,/* -* 256 temporary boot-time mappings, used by early_ioremap(), +* 512 temporary boot-time mappings, used by early_ioremap(), * before ioremap() is functional. * -* If necessary we round it up to the next 256 pages boundary so +* If necessary we round it up to the next 512 pages boundary so * that we can have a single pgd entry and a single pte table: */ #define NR_FIX_BTMAPS 64 -#define FIX_BTMAPS_SLOTS 4 +#define FIX_BTMAPS_SLOTS 8#define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) FIX_BTMAP_END = (__end_of_permanent_fixed_addresses ^
drivers/firmware/efi/Makefile +1 -1
@@ -7,4 +7,4 @@ obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o obj-$(CONFIG_UEFI_CPER) += cper.o obj-$(CONFIG_EFI_RUNTIME_MAP) += runtime-map.o obj-$(CONFIG_EFI_RUNTIME_WRAPPERS) += runtime-wrappers.o -obj-$(CONFIG_EFI_STUB) += libstub/ +obj-$(CONFIG_EFI_ARM_STUB) += libstub/