[PATCH v3 07/15] efi/libstub: Pass kernel entrypoint down to efi_enter_kernel()

Jason Gunthorpe jgg at nvidia.com
Mon Nov 16 10:52:15 PST 2026


> Update the EFI stub code shared by arm64 and RISC-V so that the kernel
> entry point is taken from struct efi_image_info rather than from opaque
> arithmetic performed on linker symbols.
> 
> Notably, this results in EFI zboot to enter via the actual kernel
> entrypoint rather than byte 0x0 of the loaded image on these
> architectures. Beyond that, it is mostly a cleanup that will allow
> special linker exports for global symbols to be dropped in subsequent
> patches.
> 
> ARM is a special case here, as it combines the EFI stub with its legacy
> decompressor, and so the generic image_info carrying direct references
> to vmlinux symbols cannot be used there. Instead, it provides an empty
> struct efi_image_info, which is passed directly to its implementation of
> efi_enter_kernel(). So on ARM, populate this efi_image_info with the
> base address that the callee expects.

Does this mean that the EFI stub never sees a decompressed image on
ARM and jumps into the legacy decompressor?

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

-- 
Jason



More information about the linux-riscv mailing list