[PATCH v3 07/15] efi/libstub: Pass kernel entrypoint down to efi_enter_kernel()
Ard Biesheuvel
ardb at kernel.org
Mon Nov 16 11:31:09 PST 2026
On Mon, 16 Nov 2026, at 19:52, Jason Gunthorpe wrote:
>> 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?
>
Exactly. x86 used to do the same, but I fixed that a while ago for
other reasons, so there this efi_image_info approach is still feasible
as well.
> Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
>
Thanks.
More information about the linux-riscv
mailing list