Home
last modified time | relevance | path

Searched hist:"0 efb61c8" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/firmware/efi/libstub/
H A Dloongarch-stub.c0efb61c8 Thu Oct 13 05:07:27 CDT 2022 Ard Biesheuvel <ardb@kernel.org> efi/loongarch: Don't jump to kernel entry via the old image

Currently, the EFI entry code for LoongArch is set up to copy the
executable image to the preferred offset, but instead of branching
directly into that image, it branches to the local copy of kernel_entry,
and relies on the logic in that function to switch to the link time
address instead.

This is a bit sloppy, and not something we can support once we merge the
EFI decompressor with the EFI stub. So let's clean this up a bit, by
adding a helper that computes the offset of kernel_entry from the start
of the image, and simply adding the result to VMLINUX_LOAD_ADDRESS.

And considering that we cannot execute from anywhere else anyway, let's
avoid efi_relocate_kernel() and just allocate the pages instead.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
/openbmc/linux/arch/loongarch/include/asm/
H A Defi.h0efb61c8 Thu Oct 13 05:07:27 CDT 2022 Ard Biesheuvel <ardb@kernel.org> efi/loongarch: Don't jump to kernel entry via the old image

Currently, the EFI entry code for LoongArch is set up to copy the
executable image to the preferred offset, but instead of branching
directly into that image, it branches to the local copy of kernel_entry,
and relies on the logic in that function to switch to the link time
address instead.

This is a bit sloppy, and not something we can support once we merge the
EFI decompressor with the EFI stub. So let's clean this up a bit, by
adding a helper that computes the offset of kernel_entry from the start
of the image, and simply adding the result to VMLINUX_LOAD_ADDRESS.

And considering that we cannot execute from anywhere else anyway, let's
avoid efi_relocate_kernel() and just allocate the pages instead.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>