Skip to content

Fix ACPI BGRT support for images located in EFI boot services memory

Josh Triplett linux-acpi lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v34 patches 9 repliesSuperseded
  3. v24 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches7 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3efi: Defer freeing boot services memory until after ACPI initarch/x86/platform/efi/efi.c include/linux/efi.h init/main.c+26 -131 reply
2/3efi: Add a function to look up existing IO memory mappingsarch/x86/platform/efi/efi.c include/linux/efi.h+29 -01 reply
3/3efi: Fix the ACPI BGRT driver for images located in EFI boot services memoryarch/x86/platform/efi/Makefile arch/x86/platform/efi/efi-bgrt.c arch/x86/platform/efi/efi.c +5 more+120 -701 reply

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCHv4 0/3] Fix ACPI BGRT support for images located in EFI boot services memory

The ACPI BGRT lets the OS access the BIOS logo image and its position on the screen at boot time, allowing it to maintain that image on the screen until ready to display something else, making boot more seamless. This series fixes support for accessing the boot logo image via the BGRT when the BIOS stores it in EFI boot services memory, as recommended by the ACPI 5.0 spec. Linux needs to copy the image out of boot services memory before reclaiming boot services memory.

The first patch refactors EFI initialization to defer freeing boot services memory until much later in the boot process, and in particular until after we have ACPI available. The second patch adds a helper function to look up existing EFI boot services mappings, to avoid re-mapping them. The third patch moves BGRT initialization to before the reclamation of boot services memory, copies the logo at that point, and reworks the existing BGRT driver to use that existing copy.

v2: Made the new internal function efi_unmap_memmap static. Incorporated
feedback from H. Peter Anvin and Matt Fleming: added stubs for x86-specific EFI functions called from init/main.c to eliminate the corresponding ifdefs in start_kernel; deferred efi_free_boot_services even later, to just before free_initmem.

v3: Moved efi_free_boot_services back to right after EFI initialization, to
avoid a WARN from check_early_ioremap_leak about not calling early_iounmap soon enough.

v4: Cast the integral phys_addr through unsigned long before casting it to a
pointer, to avoid a warning "cast to pointer from integer of different size" on 32-bit x86. Don't define efi_enter_virtual_mode as a stub on non-x86, because a different function exists on ia64 with that name, and ia64 calls that function in a different point in its initialiation; instead, go back to calling efi_enter_virtual_mode in init/main.c under an #ifdef CONFIG_X86. Define the stubs for efi_late_init and efi_free_boot_services using "static inline" to avoid unused function warnings.

v4 should replace the version currently in tip x86/efi.

Josh Triplett (3):
efi: Defer freeing boot services memory until after ACPI init
efi: Add a function to look up existing IO memory mappings
efi: Fix the ACPI BGRT driver for images located in EFI boot services memory

 arch/x86/platform/efi/Makefile   |    1 +
 arch/x86/platform/efi/efi-bgrt.c |   76 ++++++++++++++++++++++++++++++++++++++
 arch/x86/platform/efi/efi.c      |   65 +++++++++++++++++++++++++-------
 drivers/acpi/Kconfig             |    4 +-
 drivers/acpi/bgrt.c              |   76 +++++---------------------------------
 include/linux/efi-bgrt.h         |   21 +++++++++++
 include/linux/efi.h              |    8 ++++
 init/main.c                      |    5 +++
 8 files changed, 174 insertions(+), 82 deletions(-)
 create mode 100644 arch/x86/platform/efi/efi-bgrt.c
 create mode 100644 include/linux/efi-bgrt.h
Signature · 1 line
1.7.10.4