aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/riscv-stub.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-03-19 18:35:53 +0100
committerArd Biesheuvel <ardb@kernel.org>2022-05-03 15:31:28 +0200
commit416a9f84a77cf826fed1bf9a1908b2d066c17430 (patch)
tree3ccd2b7499377aab52d198315b3d0d46c6068b7c /drivers/firmware/efi/libstub/riscv-stub.c
parentefi: x86: Set the NX-compatibility flag in the PE header (diff)
downloadlinux-dev-416a9f84a77cf826fed1bf9a1908b2d066c17430.tar.xz
linux-dev-416a9f84a77cf826fed1bf9a1908b2d066c17430.zip
efi: libstub: pass image handle to handle_kernel_image()
In a future patch, arm64's implementation of handle_kernel_image() will omit randomizing the placement of the kernel if the load address was chosen randomly by the loader. In order to do this, it needs to locate a protocol on the image handle, so pass it to handle_kernel_image(). Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/riscv-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/riscv-stub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/riscv-stub.c b/drivers/firmware/efi/libstub/riscv-stub.c
index 9c460843442f..eec043873354 100644
--- a/drivers/firmware/efi/libstub/riscv-stub.c
+++ b/drivers/firmware/efi/libstub/riscv-stub.c
@@ -80,7 +80,8 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
unsigned long *image_size,
unsigned long *reserve_addr,
unsigned long *reserve_size,
- efi_loaded_image_t *image)
+ efi_loaded_image_t *image,
+ efi_handle_t image_handle)
{
unsigned long kernel_size = 0;
unsigned long preferred_addr;