Skip to contentSkip to conversation

EFI changes for v5.8

GIT PULL Merged Ingo Molnar 4 participants 7 messages Jun 1, 2020 – Jun 2, 2020

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest efi/core git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-2020-06-01

# HEAD: e9524fb97ab5b41b85e1d3408f8e513433798f3c efi/x86: Don't blow away existing initrd

The EFI changes for this cycle are:

- preliminary changes for RISC-V
- Add support for setting the resolution on the EFI framebuffer
- Simplify kernel image loading for arm64
- Move .bss into .data via the linker script instead of relying on symbol annotations.
- Get rid of __pure getters to access global variables
- Clean up the config table matching arrays
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Implement printk() support, including support for wide character strings
- Simplify GDT handling in early mixed mode thunking code
- Some other minor fixes and cleanups

Thanks,

Ingo

------------------>
Ard Biesheuvel (20):
efi/libstub: Make initrd file loader configurable efi/libstub: unify EFI call wrappers for non-x86 efi/libstub/random: Align allocate size to EFI_ALLOC_ALIGN efi/libstub/random: Increase random alloc granularity efi/libstub/arm64: Replace 'preferred' offset with alignment check efi/libstub/arm64: Simplify randomized loading of kernel image efi/libstub: Add API function to allocate aligned memory efi/libstub/arm64: Switch to ordinary page allocator for kernel image efi/libstub: Move efi_relocate_kernel() into separate source file efi/libstub: Drop __pure getter for efi_system_table efi/libstub: Drop __pure getters for EFI stub options efi/libstub/x86: Avoid getter function for efi_is64
efi: Clean up config table description arrays
efi: Move arch_tables check to caller
efi/libstub: Re-enable command line initrd loading for x86 efi/libstub/x86: Work around LLVM ELF quirk build regression efi/libstub: Make efi_printk() input argument const char* efi/libstub: Use pool allocation for the command line efi/efivars: Add missing kobject_put() in sysfs entry creation error path efi/libstub: Add missing prototype for PE/COFF entry point

Arvind Sankar (56):
efi/gop: Remove redundant current_fb_base
efi/gop: Move check for framebuffer before con_out efi/gop: Get mode information outside the loop efi/gop: Factor out locating the gop into a function efi/gop: Slightly re-arrange logic of find_gop efi/gop: Move variable declarations into loop block efi/gop: Use helper macros for populating lfb_base efi/gop: Use helper macros for find_bits
efi/gop: Remove unreachable code from setup_pixel_info efi/gop: Add prototypes for query_mode and set_mode efi/gop: Allow specifying mode number on command line efi/gop: Allow specifying mode by <xres>x<yres> efi/gop: Allow specifying depth as well as resolution efi/gop: Allow automatically choosing the best mode efi/arm: Remove __efistub_global annotation efi/x86: Remove __efistub_global and add relocation check
efi: Kill __efistub_global
efi/x86: Use correct size for boot_params efi/libstub: Add a helper function to split 64-bit values efi/libstub: Move pr_efi/pr_efi_err into efi namespace efi/x86: Use efi_err for error messages
efi/gop: Use efi_err for error messages
efi/tpm: Use efi_err for error messages efi/libstub: Upgrade ignored dtb= argument message to error efi/x86: Move command-line initrd loading to efi_main efi/libstub: Unify initrd loading across architectures efi/x86: Support builtin command line
efi/libstub: Check return value of efi_parse_options efi/libstub: Fix mixed mode boot issue after macro refactor efi/libstub: Include dependencies of efistub.h efi/libstub: Rename efi_[char16_]printk to efi_[char16_]puts efi/libstub: Buffer output of efi_puts
efi/libstub: Add a basic printf implementation efi/libstub: Optimize for size instead of speed efi/printf: Drop %n format and L qualifier efi/printf: Add 64-bit and 8-bit integer support efi/printf: Factor out flags parsing and handle '%' earlier efi/printf: Fix minor bug in precision handling efi/printf: Merge 'p' with the integer formats efi/printf: Factor out width/precision parsing efi/printf: Factor out integer argument retrieval efi/printf: Handle null string input
efi/printf: Refactor code to consolidate padding and output efi/printf: Abort on invalid format
efi/printf: Turn vsprintf into vsnprintf efi/libstub: Implement printk-style logging efi/libstub: Add definitions for console input and events efi/gop: Add an option to list out the available GOP modes efi/printf: Add support for wchar_t (UTF-16) efi/libstub: Add UTF-8 decoding to efi_puts efi/libstub: Use %ls for filename
efi/libstub: Get the exact UTF-8 length efi/libstub: Use snprintf with %ls to convert the command line efi/libstub: Don't parse overlong command lines efi/x86: Drop the special GDT for the EFI thunk efi/x86: Don't blow away existing initrd

Atish Patra (1):
efi/libstub: Move arm-stub to a common file

Joe Perches (1):
efi/libstub: Correct comment typos

Zou Wei (1):
efi/libstub/arm: Make install_memreserve_table static

 Documentation/fb/efifb.rst                         |  38 +-
 arch/arm/Kconfig                                   |   2 +-
 arch/arm/boot/compressed/efi-header.S              |   2 +-
 arch/arm/boot/compressed/vmlinux.lds.S             |   2 +-
 arch/arm/include/asm/efi.h                         |   8 -
 arch/arm64/Kconfig                                 |   2 +-
 arch/arm64/include/asm/efi.h                       |   8 -
 arch/arm64/kernel/efi-entry.S                      |   2 +-
 arch/arm64/kernel/efi-header.S                     |   2 +-
 arch/ia64/kernel/efi.c                             |  12 +-
 arch/x86/boot/compressed/efi_thunk_64.S            |  19 +-
 arch/x86/boot/compressed/vmlinux.lds.S             |   1 +
 arch/x86/include/asm/efi.h                         |  50 +-
 arch/x86/platform/efi/efi.c                        |   8 +-
 arch/x86/xen/efi.c                                 |   2 +-
 drivers/firmware/efi/Kconfig                       |  15 +-
 drivers/firmware/efi/arm-init.c                    |   4 +-
 drivers/firmware/efi/efi.c                         |  44 +-
 drivers/firmware/efi/efivars.c                     |   4 +-
 drivers/firmware/efi/libstub/Makefile              |  47 +-
 drivers/firmware/efi/libstub/alignedmem.c          |  57 ++
 drivers/firmware/efi/libstub/arm32-stub.c          |  12 +-
 drivers/firmware/efi/libstub/arm64-stub.c          | 106 ++--
 drivers/firmware/efi/libstub/efi-stub-helper.c     | 381 +++++++++-----
 .../efi/libstub/{arm-stub.c => efi-stub.c}         |  93 ++--
 drivers/firmware/efi/libstub/efistub.h             | 191 +++++--
 drivers/firmware/efi/libstub/fdt.c                 |  24 +-
 drivers/firmware/efi/libstub/file.c                |  48 +-
 drivers/firmware/efi/libstub/gop.c                 | 583 +++++++++++++++++----
 drivers/firmware/efi/libstub/mem.c                 | 191 +------
 drivers/firmware/efi/libstub/pci.c                 |  10 +-
 drivers/firmware/efi/libstub/randomalloc.c         |   6 +-
 drivers/firmware/efi/libstub/relocate.c            | 174 ++++++
 drivers/firmware/efi/libstub/secureboot.c          |   4 +-
 drivers/firmware/efi/libstub/tpm.c                 |   2 +-
 drivers/firmware/efi/libstub/vsprintf.c            | 564 ++++++++++++++++++++
 drivers/firmware/efi/libstub/x86-stub.c            | 155 +++---
 include/linux/efi.h                                |   6 +-
 38 files changed, 2050 insertions(+), 829 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/alignedmem.c
 rename drivers/firmware/efi/libstub/{arm-stub.c => efi-stub.c} (83%)
 create mode 100644 drivers/firmware/efi/libstub/relocate.c
 create mode 100644 drivers/firmware/efi/libstub/vsprintf.c
#1 lore raw
Quoted 25 lines · Ingo Molnar

Linus,

Please pull the latest efi/core git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-2020-06-01

   # HEAD: e9524fb97ab5b41b85e1d3408f8e513433798f3c efi/x86: Don't blow away existing initrd

The EFI changes for this cycle are:

- preliminary changes for RISC-V
- Add support for setting the resolution on the EFI framebuffer
- Simplify kernel image loading for arm64
- Move .bss into .data via the linker script instead of relying on symbol annotations.
- Get rid of __pure getters to access global variables
- Clean up the config table matching arrays
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Implement printk() support, including support for wide character strings
- Simplify GDT handling in early mixed mode thunking code
- Some other minor fixes and cleanups

Quoted 4 lines

Thanks,

Ingo

Please note that Stephen reported a conflict with the ARM32 tree, due to the replacement of all instances of pr_efi_err() with efi_err(), including a couple in some ARM code that is being modified.

https://lore.kernel.org/linux-next/[email protected]/

Quoted 134 lines

------------------>
Ard Biesheuvel (20):
efi/libstub: Make initrd file loader configurable efi/libstub: unify EFI call wrappers for non-x86 efi/libstub/random: Align allocate size to EFI_ALLOC_ALIGN efi/libstub/random: Increase random alloc granularity efi/libstub/arm64: Replace 'preferred' offset with alignment check efi/libstub/arm64: Simplify randomized loading of kernel image efi/libstub: Add API function to allocate aligned memory efi/libstub/arm64: Switch to ordinary page allocator for kernel image efi/libstub: Move efi_relocate_kernel() into separate source file efi/libstub: Drop __pure getter for efi_system_table efi/libstub: Drop __pure getters for EFI stub options efi/libstub/x86: Avoid getter function for efi_is64
efi: Clean up config table description arrays
efi: Move arch_tables check to caller
efi/libstub: Re-enable command line initrd loading for x86 efi/libstub/x86: Work around LLVM ELF quirk build regression efi/libstub: Make efi_printk() input argument const char* efi/libstub: Use pool allocation for the command line efi/efivars: Add missing kobject_put() in sysfs entry creation error path efi/libstub: Add missing prototype for PE/COFF entry point

Arvind Sankar (56):
efi/gop: Remove redundant current_fb_base
efi/gop: Move check for framebuffer before con_out efi/gop: Get mode information outside the loop efi/gop: Factor out locating the gop into a function efi/gop: Slightly re-arrange logic of find_gop efi/gop: Move variable declarations into loop block efi/gop: Use helper macros for populating lfb_base efi/gop: Use helper macros for find_bits
efi/gop: Remove unreachable code from setup_pixel_info efi/gop: Add prototypes for query_mode and set_mode efi/gop: Allow specifying mode number on command line efi/gop: Allow specifying mode by <xres>x<yres> efi/gop: Allow specifying depth as well as resolution efi/gop: Allow automatically choosing the best mode efi/arm: Remove __efistub_global annotation efi/x86: Remove __efistub_global and add relocation check
efi: Kill __efistub_global
efi/x86: Use correct size for boot_params efi/libstub: Add a helper function to split 64-bit values efi/libstub: Move pr_efi/pr_efi_err into efi namespace efi/x86: Use efi_err for error messages
efi/gop: Use efi_err for error messages
efi/tpm: Use efi_err for error messages efi/libstub: Upgrade ignored dtb= argument message to error efi/x86: Move command-line initrd loading to efi_main efi/libstub: Unify initrd loading across architectures efi/x86: Support builtin command line
efi/libstub: Check return value of efi_parse_options efi/libstub: Fix mixed mode boot issue after macro refactor efi/libstub: Include dependencies of efistub.h efi/libstub: Rename efi_[char16_]printk to efi_[char16_]puts efi/libstub: Buffer output of efi_puts
efi/libstub: Add a basic printf implementation efi/libstub: Optimize for size instead of speed efi/printf: Drop %n format and L qualifier efi/printf: Add 64-bit and 8-bit integer support efi/printf: Factor out flags parsing and handle '%' earlier efi/printf: Fix minor bug in precision handling efi/printf: Merge 'p' with the integer formats efi/printf: Factor out width/precision parsing efi/printf: Factor out integer argument retrieval efi/printf: Handle null string input
efi/printf: Refactor code to consolidate padding and output efi/printf: Abort on invalid format
efi/printf: Turn vsprintf into vsnprintf efi/libstub: Implement printk-style logging efi/libstub: Add definitions for console input and events efi/gop: Add an option to list out the available GOP modes efi/printf: Add support for wchar_t (UTF-16) efi/libstub: Add UTF-8 decoding to efi_puts efi/libstub: Use %ls for filename
efi/libstub: Get the exact UTF-8 length efi/libstub: Use snprintf with %ls to convert the command line efi/libstub: Don't parse overlong command lines efi/x86: Drop the special GDT for the EFI thunk efi/x86: Don't blow away existing initrd

Atish Patra (1):
efi/libstub: Move arm-stub to a common file

Joe Perches (1):
efi/libstub: Correct comment typos

Zou Wei (1):
efi/libstub/arm: Make install_memreserve_table static

 Documentation/fb/efifb.rst                         |  38 +-
 arch/arm/Kconfig                                   |   2 +-
 arch/arm/boot/compressed/efi-header.S              |   2 +-
 arch/arm/boot/compressed/vmlinux.lds.S             |   2 +-
 arch/arm/include/asm/efi.h                         |   8 -
 arch/arm64/Kconfig                                 |   2 +-
 arch/arm64/include/asm/efi.h                       |   8 -
 arch/arm64/kernel/efi-entry.S                      |   2 +-
 arch/arm64/kernel/efi-header.S                     |   2 +-
 arch/ia64/kernel/efi.c                             |  12 +-
 arch/x86/boot/compressed/efi_thunk_64.S            |  19 +-
 arch/x86/boot/compressed/vmlinux.lds.S             |   1 +
 arch/x86/include/asm/efi.h                         |  50 +-
 arch/x86/platform/efi/efi.c                        |   8 +-
 arch/x86/xen/efi.c                                 |   2 +-
 drivers/firmware/efi/Kconfig                       |  15 +-
 drivers/firmware/efi/arm-init.c                    |   4 +-
 drivers/firmware/efi/efi.c                         |  44 +-
 drivers/firmware/efi/efivars.c                     |   4 +-
 drivers/firmware/efi/libstub/Makefile              |  47 +-
 drivers/firmware/efi/libstub/alignedmem.c          |  57 ++
 drivers/firmware/efi/libstub/arm32-stub.c          |  12 +-
 drivers/firmware/efi/libstub/arm64-stub.c          | 106 ++--
 drivers/firmware/efi/libstub/efi-stub-helper.c     | 381 +++++++++-----
 .../efi/libstub/{arm-stub.c => efi-stub.c}         |  93 ++--
 drivers/firmware/efi/libstub/efistub.h             | 191 +++++--
 drivers/firmware/efi/libstub/fdt.c                 |  24 +-
 drivers/firmware/efi/libstub/file.c                |  48 +-
 drivers/firmware/efi/libstub/gop.c                 | 583 +++++++++++++++++----
 drivers/firmware/efi/libstub/mem.c                 | 191 +------
 drivers/firmware/efi/libstub/pci.c                 |  10 +-
 drivers/firmware/efi/libstub/randomalloc.c         |   6 +-
 drivers/firmware/efi/libstub/relocate.c            | 174 ++++++
 drivers/firmware/efi/libstub/secureboot.c          |   4 +-
 drivers/firmware/efi/libstub/tpm.c                 |   2 +-
 drivers/firmware/efi/libstub/vsprintf.c            | 564 ++++++++++++++++++++
 drivers/firmware/efi/libstub/x86-stub.c            | 155 +++---
 include/linux/efi.h                                |   6 +-
 38 files changed, 2050 insertions(+), 829 deletions(-)
 create mode 100644 drivers/firmware/efi/libstub/alignedmem.c
 rename drivers/firmware/efi/libstub/{arm-stub.c => efi-stub.c} (83%)
 create mode 100644 drivers/firmware/efi/libstub/relocate.c
 create mode 100644 drivers/firmware/efi/libstub/vsprintf.c
#2 lore raw
Quoted 28 lines · Ard Biesheuvel
Quoted 27 lines · Ingo Molnar

Linus,

Please pull the latest efi/core git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-2020-06-01

   # HEAD: e9524fb97ab5b41b85e1d3408f8e513433798f3c efi/x86: Don't blow away existing initrd

The EFI changes for this cycle are:

- preliminary changes for RISC-V
- Add support for setting the resolution on the EFI framebuffer
- Simplify kernel image loading for arm64
- Move .bss into .data via the linker script instead of relying on symbol annotations.
- Get rid of __pure getters to access global variables
- Clean up the config table matching arrays
- Rename pr_efi/pr_efi_err to efi_info/efi_err, and use them consistently
- Simplify and unify initrd loading
- Parse the builtin command line on x86 (if provided)
- Implement printk() support, including support for wide character strings
- Simplify GDT handling in early mixed mode thunking code
- Some other minor fixes and cleanups

Thanks,

Quoted 8 lines
Quoted 2 lines

Ingo

Please note that Stephen reported a conflict with the ARM32 tree, due to the replacement of all instances of pr_efi_err() with efi_err(), including a couple in some ARM code that is being modified.

https://lore.kernel.org/linux-next/[email protected]/

Indeed!

Since these semantic conflicts and build failures would not trigger on Linus's test builds normally, it might make sense to double check that this comes up empty after both the EFI and the arm32 merge:

thule:~/tip> git grep -w pr_efi_err
thule:~/tip>

Thanks,

Ingo

#3 lore raw
In reply to Ard Biesheuvel
Quoted 4 lines · Ard Biesheuvel

Please note that Stephen reported a conflict with the ARM32 tree, due to the replacement of all instances of pr_efi_err() with efi_err(), including a couple in some ARM code that is being modified.

Ok, I'll try to remember, but I probably won't. So it would be lovely to be reminded when I get the arm pull.

That said, if it's just outright conflicts, that's not a big deal and the resolution looks trivial. But if there are actual semantic conflicts that don't show up during the merge like Ingo implies, I would indeed not notice due to me not doing any cross-builds.

Linus

merge bot Merged
#6 lore raw
In reply to Ingo Molnar
The pull request you sent on Mon, 1 Jun 2020 15:24:43 +0200:

The pull request you sent on Mon, 1 Jun 2020 15:24:43 +0200:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git efi-core-2020-06-01

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/58ff3b7604a461a766a84348e620834dce9834a9

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
#4 lore raw
In reply to Linus Torvalds
Quoted 3 lines · Linus Torvalds

Ok, I'll try to remember, but I probably won't. So it would be lovely to be reminded when I get the arm pull.

Well, the arm pull already came in, and mentioned it, and it all looked entirely local and simple, so it's all good.

Or rather, it's all _potentially_ good, but completely untested by yours truly.

rmk said he'd take a look, but maybe Ard might want to peek at it too.

Linus

#5 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Linus Torvalds

Ok, I'll try to remember, but I probably won't. So it would be lovely to be reminded when I get the arm pull.

Quoted 7 lines

Well, the arm pull already came in, and mentioned it, and it all looked entirely local and simple, so it's all good.

Or rather, it's all _potentially_ good, but completely untested by yours truly.

rmk said he'd take a look, but maybe Ard might want to peek at it too.

Builds and boots fine via EFI on ARM32, thanks.