Skip to content

efi: more fixes and general cleanups for v5.6

Ard Biesheuvel linux-efi 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 0 repliesNew
  2. v17 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fix logic in #3 for running 64-bit kernels on 32-bit firmware when mixed mode support is not compiled in. In this case, we can still boot but we will not have access to runtime services.
- Refactor the C wrappers involved in calling SetVirtualAddressMap, which were kludgy and hard to follow (#6, #7)
- Incorporate review feedback from Arvind and Andy regarding the asm wrappers (#8, #9, #10), and simplify them a bit further,
- Drop efi_runtime_init32/64 entirely since they turned out to be unnecessary. (#11)
- Add another pair of cleanup patches for the runtime services code (#13, #14)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14efi/libstub: fix boot argument handling in mixed mode entry codearch/x86/boot/compressed/head_64.S+10 -70 replies
2/14efi/libstub: use correct system table pointer in mixed mode efi_free()arch/x86/boot/compressed/eboot.c+2 -10 replies
3/14efi/x86: re-disable RT services for 32-bit kernels running on 64-bit EFIarch/x86/include/asm/efi.h+2 -160 replies
4/14efi/x86: map the entire EFI vendor string before copying itarch/x86/platform/efi/efi.c+7 -60 replies
5/14efi/x86: avoid redundant cast of EFI firmware service pointerarch/x86/include/asm/efi.h include/linux/efi.h+4 -80 replies
6/14efi/x86: split off some old memmap handling into separate routinesarch/x86/platform/efi/efi_64.c+22 -130 replies
7/14efi/x86: split SetVirtualAddresMap() wrappers into 32 and 64 bit versionsarch/x86/include/asm/efi.h arch/x86/platform/efi/efi.c arch/x86/platform/efi/efi_32.c +1 more+55 -540 replies
8/14efi/x86: simplify i386 efi_call_phys() firmware call wrapperarch/x86/include/asm/efi.h arch/x86/platform/efi/efi_32.c arch/x86/platform/efi/efi_stub_32.S+20 -970 replies
9/14efi/x86: simplify 64-bit EFI firmware call wrapperarch/x86/platform/efi/Makefile arch/x86/platform/efi/efi_64.c arch/x86/platform/efi/efi_stub_64.S +1 more+12 -380 replies
10/14efi/x86: simplify mixed mode call wrapperarch/x86/include/asm/efi.h arch/x86/platform/efi/efi.c arch/x86/platform/efi/efi_64.c +1 more+67 -1450 replies
11/14efi/x86: drop two near identical versions of efi_runtime_init()arch/x86/platform/efi/efi.c include/linux/efi.h+5 -1090 replies
12/14efi/x86: clean up efi_systab_init() routine for legibilityarch/x86/platform/efi/efi.c+82 -840 replies
13/14efi/x86: don't panic or BUG() on non-critical error conditionsarch/x86/platform/efi/efi.c arch/x86/platform/efi/efi_64.c+19 -180 replies
14/14efi/x86: remove unreachable code in kexec_enter_virtual_mode()arch/x86/platform/efi/efi.c+0 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/14] efi: more fixes and general cleanups for v5.6

This is a combined v2 followup to the v1s of

efi: more fixes and general cleanups for v5.6 [0] efi/x86: clean up and simplify runtime call wrappers [1]

sent out last week. I have some other changes pending regarding the mapping of EFI runtime memory with restricted permissions [2], but I will get back to those after finishing up with the changes below.

Changes since v1:
- Fix logic in #3 for running 64-bit kernels on 32-bit firmware when mixed mode support is not compiled in. In this case, we can still boot but we will not have access to runtime services.
- Refactor the C wrappers involved in calling SetVirtualAddressMap, which were kludgy and hard to follow (#6, #7)
- Incorporate review feedback from Arvind and Andy regarding the asm wrappers (#8, #9, #10), and simplify them a bit further,
- Drop efi_runtime_init32/64 entirely since they turned out to be unnecessary. (#11)
- Add another pair of cleanup patches for the runtime services code (#13, #14)

Branch can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=efi-more-cleanup-for-v5.6-v2

[0] https://lore.kernel.org/linux-efi/[email protected]/
[1] https://lore.kernel.org/linux-efi/[email protected]/
[2] https://lore.kernel.org/linux-efi/[email protected]/

Cc Ingo Molnar <[email protected]>
Cc Arvind Sankar <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Andy Lutomirski <[email protected]>

Ard Biesheuvel (14):
efi/libstub: fix boot argument handling in mixed mode entry code efi/libstub: use correct system table pointer in mixed mode efi_free() efi/x86: re-disable RT services for 32-bit kernels running on 64-bit
EFI
efi/x86: map the entire EFI vendor string before copying it efi/x86: avoid redundant cast of EFI firmware service pointer efi/x86: split off some old memmap handling into separate routines efi/x86: split SetVirtualAddresMap() wrappers into 32 and 64 bit
versions
efi/x86: simplify i386 efi_call_phys() firmware call wrapper efi/x86: simplify 64-bit EFI firmware call wrapper efi/x86: simplify mixed mode call wrapper
efi/x86: drop two near identical versions of efi_runtime_init() efi/x86: clean up efi_systab_init() routine for legibility efi/x86: don't panic or BUG() on non-critical error conditions efi/x86: remove unreachable code in kexec_enter_virtual_mode()

 arch/x86/boot/compressed/eboot.c     |   3 +-
 arch/x86/boot/compressed/head_64.S   |  17 +-
 arch/x86/include/asm/efi.h           |  43 +--
 arch/x86/platform/efi/Makefile       |   1 -
 arch/x86/platform/efi/efi.c          | 354 +++++++-------------
 arch/x86/platform/efi/efi_32.c       |  22 +-
 arch/x86/platform/efi/efi_64.c       | 129 ++++---
 arch/x86/platform/efi/efi_stub_32.S  | 109 +-----
 arch/x86/platform/efi/efi_stub_64.S  |  39 +--
 arch/x86/platform/efi/efi_thunk_64.S | 121 ++-----
 arch/x86/platform/uv/bios_uv.c       |   7 +-
 include/linux/efi.h                  |  23 +-
 12 files changed, 288 insertions(+), 580 deletions(-)
Signature · 1 line
2.20.1