Skip to content

efi: clean up contents of struct efi

Ard Biesheuvel linux-arm-kernel linux-efi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18efi: drop handling of 'boot_info' configuration tablearch/x86/platform/efi/efi.c drivers/firmware/efi/efi.c include/linux/efi.h+0 -50 replies
2/18efi/ia64: move HCDP and MPS table handling into IA64 arch codearch/ia64/kernel/efi.c arch/x86/platform/efi/efi.c drivers/firmware/efi/efi.c +2 more+24 -150 replies
3/18efi: move UGA and PROP table handling to x86 codearch/x86/platform/efi/efi.c drivers/firmware/efi/efi.c include/linux/efi.h+31 -280 replies
4/18efi: make rng_seed table handling local to efi.cdrivers/firmware/efi/efi.c include/linux/efi.h+10 -120 replies
5/18efi: move mem_attr_table out of struct efiarch/x86/platform/efi/efi.c drivers/firmware/efi/efi.c drivers/firmware/efi/memattr.c +1 more+11 -100 replies
6/18efi: make memreserve table handling local to efi.cdrivers/firmware/efi/efi.c include/linux/efi.h+6 -70 replies
7/18efi: merge EFI system table revision and vendor checksarch/ia64/kernel/efi.c arch/x86/platform/efi/efi.c drivers/firmware/efi/arm-init.c +2 more+83 -830 replies
8/18efi/ia64: use existing helpers to locate ESI tablearch/ia64/kernel/efi.c arch/ia64/kernel/esi.c+10 -170 replies
9/18efi/ia64: use local variable for EFI system table addressarch/ia64/kernel/efi.c+6 -50 replies
10/18efi/ia64: switch to efi_config_parse_tables()arch/ia64/kernel/efi.c+4 -10 replies
11/18efi: make efi_config_init() x86 onlyarch/x86/platform/efi/efi.c drivers/firmware/efi/efi.c include/linux/efi.h+30 -320 replies
12/18efi: clean up config_parse_tables()arch/ia64/kernel/efi.c arch/x86/platform/efi/efi.c drivers/firmware/efi/arm-init.c +2 more+32 -342 replies
13/18efi/x86: remove runtime table address from kexec EFI setup dataarch/x86/include/asm/efi.h arch/x86/kernel/kexec-bzimage64.c arch/x86/platform/efi/efi.c+1 -50 replies
14/18efi/x86: make fw_vendor, config_table and runtime sysfs nodes x86 specificarch/x86/include/asm/efi.h arch/x86/kernel/kexec-bzimage64.c arch/x86/platform/efi/efi.c +4 more+59 -550 replies
15/18efi/x86: merge assignments of efi.runtime_versionarch/x86/platform/efi/efi.c+2 -170 replies
16/18efi: add 'runtime' pointer to struct efiarch/x86/include/asm/efi.h arch/x86/kernel/asm-offsets_32.c arch/x86/platform/efi/efi.c +6 more+49 -228 replies
17/18efi/arm: drop unnecessary references to efi.systabdrivers/firmware/efi/arm-init.c drivers/firmware/efi/arm-runtime.c+14 -370 replies
18/18efi/x86: drop 'systab' member from struct efiarch/x86/platform/efi/efi.c include/linux/efi.h+41 -980 replies

Reviews trailers per patch

None of the 18 patches has a Reviewed-by or Acked-by.

PatchTony Luck
SeriesT-b
1/18
2/18
3/18
4/18
5/18
6/18
7/18
8/18
9/18
10/18
11/18
12/18
13/18
14/18
15/18
16/18
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/18] efi: clean up contents of struct efi

The generic r/w singleton object 'struct efi efi' is currently being used as a dumping ground for memory addresses of firmware tables that only have significance for a single architecture, or only at boot time [whereas struct efi is an object with indefinite lifetime, and which is exported to modules]

Since we're expecting a new arrival that does affect all architectures, which will need to be added to struct efi as well, let's do a cleanup pass, and move out all the per-arch pieces and other stuff that does not need to live in a global r/w struct.

As a side effect, I ran into some other things that can be refactored so that more code is shared between architectures, or made x86 specific if it is something that should maybe not have existed in the first place, and x86 is the only architecture where we cannot remove it for compatibility reasons.

Finally, we get rid of the struct efi::systab member, which we only need at runtime to get at the 'runtime' pointer, so let's store that instead. This allows us to drop some ugly handling of the remapped systab address, which we cannot discover as easily as the remapped 'runtime' pointer.

Ard Biesheuvel (18):
efi: drop handling of 'boot_info' configuration table efi/ia64: move HCDP and MPS table handling into IA64 arch code
efi: move UGA and PROP table handling to x86 code
efi: make rng_seed table handling local to efi.c
efi: move mem_attr_table out of struct efi
efi: make memreserve table handling local to efi.c
efi: merge EFI system table revision and vendor checks efi/ia64: use existing helpers to locate ESI table efi/ia64: use local variable for EFI system table address efi/ia64: switch to efi_config_parse_tables()
efi: make efi_config_init() x86 only
efi: clean up config_parse_tables()
efi/x86: remove runtime table address from kexec EFI setup data efi/x86: make fw_vendor, config_table and runtime sysfs nodes x86
specific
efi/x86: merge assignments of efi.runtime_version
efi: add 'runtime' pointer to struct efi
efi/arm: drop unnecessary references to efi.systab efi/x86: drop 'systab' member from struct efi

 arch/ia64/kernel/efi.c                  |  55 ++--
 arch/ia64/kernel/esi.c                  |  21 +-
 arch/x86/include/asm/efi.h              |   6 +-
 arch/x86/kernel/asm-offsets_32.c        |   5 +
 arch/x86/kernel/kexec-bzimage64.c       |   5 +-
 arch/x86/platform/efi/efi.c             | 262 ++++++++++----------
 arch/x86/platform/efi/efi_32.c          |  13 +-
 arch/x86/platform/efi/efi_64.c          |  14 +-
 arch/x86/platform/efi/efi_stub_32.S     |  21 +-
 arch/x86/platform/efi/quirks.c          |   2 +-
 drivers/firmware/efi/arm-init.c         |  68 ++---
 drivers/firmware/efi/arm-runtime.c      |  18 --
 drivers/firmware/efi/efi.c              | 237 ++++++++----------
 drivers/firmware/efi/memattr.c          |  13 +-
 drivers/firmware/efi/runtime-wrappers.c |   4 +-
 drivers/firmware/pcdp.c                 |   8 +-
 include/linux/efi.h                     |  76 +++---
 17 files changed, 379 insertions(+), 449 deletions(-)
Signature · 1 line
2.17.1