[PATCH 0/5] efi: Expose loaded image properties via info struct
Ard Biesheuvel
ardb+git at google.com
Fri Nov 6 06:19:37 PST 2026
From: Ard Biesheuvel <ardb at kernel.org>
Clean up the arm64 build script and linker hacks that zboot uses to
obtain properties of the loaded image (which it cannot access directly
via a relative reference like the ordinary EFI stub).
Instead, define a struct efi_image_info (whose contents are arch
specific), and expose its offset in the loaded image via the arm64 image
header, so that zboot can access it after decompressing the image.
Cc: Jason Gunthorpe <jgg at nvidia.com>
Link: https://lore.kernel.org/all/0-v2-989a18390eb1+486-arm64_drtm_jgg@nvidia.com/
Ard Biesheuvel (5):
efi/libstub: Make efi_remap_image() return efi_status_t
efi/libstub: Pass a struct efi_image_info to efi_stub_common()
efi/zboot: Disentangle efi_remap_image() from efi_cache_sync_image()
efi/arm64: Expose struct efi_image_info via the image header
efi/arm64: Drop build and linker script hacks to obtain image code
size
Documentation/arch/arm64/booting.rst | 3 +-
arch/arm64/boot/Makefile | 3 --
arch/arm64/include/asm/efi.h | 11 ++++++
arch/arm64/include/asm/image.h | 4 ++-
arch/arm64/kernel/efi-header.S | 6 ++++
arch/arm64/kernel/head.S | 3 +-
arch/arm64/kernel/image-vars.h | 4 ---
drivers/firmware/efi/libstub/arm64-stub.c | 16 +++++++++
drivers/firmware/efi/libstub/arm64.c | 13 ++++---
drivers/firmware/efi/libstub/efi-stub-entry.c | 8 ++++-
drivers/firmware/efi/libstub/efi-stub-helper.c | 13 ++++---
drivers/firmware/efi/libstub/efi-stub.c | 3 +-
drivers/firmware/efi/libstub/efistub.h | 16 +++++++--
drivers/firmware/efi/libstub/zboot.c | 36 ++++++++++++++++++--
drivers/firmware/efi/libstub/zboot.lds | 7 ----
15 files changed, 112 insertions(+), 34 deletions(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.56.0.455.g6c5a503b38-goog
More information about the linux-arm-kernel
mailing list