Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb+git@google.com>
To: linux-efi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Ard Biesheuvel <ardb@kernel.org>,
	 Jason Gunthorpe <jgg@nvidia.com>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Huacai Chen <chenhuacai@kernel.org>,
	loongarch@lists.linux.dev,  linux-riscv@lists.infradead.org
Subject: [PATCH v4 11/19] efi/libstub: Drop reserve_addr/_size params from handle_kernel_image()
Date: Wed, 18 Nov 2026 19:21:17 +0100	[thread overview]
Message-ID: <20261118182105.1633603-32-ardb+git@google.com> (raw)
In-Reply-To: <20261118182105.1633603-21-ardb+git@google.com>

From: Ard Biesheuvel <ardb@kernel.org>

The reserve_addr and reserve_size variable pointers passed to
handle_kernel_image() are no longer used, so drop them from the caller
and from the prototype.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 drivers/firmware/efi/libstub/arm32-stub.c     | 2 --
 drivers/firmware/efi/libstub/arm64-stub.c     | 2 --
 drivers/firmware/efi/libstub/efi-stub-entry.c | 6 ------
 drivers/firmware/efi/libstub/efistub.h        | 2 --
 drivers/firmware/efi/libstub/loongarch-stub.c | 2 --
 drivers/firmware/efi/libstub/riscv-stub.c     | 2 --
 6 files changed, 16 deletions(-)

diff --git a/drivers/firmware/efi/libstub/arm32-stub.c b/drivers/firmware/efi/libstub/arm32-stub.c
index 55d4fa3177a9..3ca20d2dd4d2 100644
--- a/drivers/firmware/efi/libstub/arm32-stub.c
+++ b/drivers/firmware/efi/libstub/arm32-stub.c
@@ -86,8 +86,6 @@ struct efi_image_info efistub_image_info = {};
 
 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_handle_t image_handle,
 				 const struct efi_image_info **image_info)
diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c
index 6140def24c69..af38cf73cf01 100644
--- a/drivers/firmware/efi/libstub/arm64-stub.c
+++ b/drivers/firmware/efi/libstub/arm64-stub.c
@@ -15,8 +15,6 @@
 
 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_handle_t image_handle,
 				 const struct efi_image_info **image_info)
diff --git a/drivers/firmware/efi/libstub/efi-stub-entry.c b/drivers/firmware/efi/libstub/efi-stub-entry.c
index 36ea6aa2cfcc..a2fefe1ded05 100644
--- a/drivers/firmware/efi/libstub/efi-stub-entry.c
+++ b/drivers/firmware/efi/libstub/efi-stub-entry.c
@@ -36,9 +36,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 	efi_status_t status;
 	unsigned long image_addr;
 	unsigned long image_size = 0;
-	/* addr/point and size pairs for memory management*/
-	unsigned long reserve_addr = 0;
-	unsigned long reserve_size = 0;
 
 	WRITE_ONCE(efi_system_table, systab);
 
@@ -66,8 +63,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 	efi_info("Booting Linux Kernel...\n");
 
 	status = handle_kernel_image(&image_addr, &image_size,
-				     &reserve_addr,
-				     &reserve_size,
 				     image, handle, &image_info);
 	if (status != EFI_SUCCESS) {
 		efi_err("Failed to relocate kernel\n");
@@ -77,7 +72,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 	status = efi_stub_common(handle, image, image_info, cmdline_ptr);
 
 	efi_free(image_size, image_addr);
-	efi_free(reserve_size, reserve_addr);
 
 	return status;
 }
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
index e45d16095247..4e6af37c4ecb 100644
--- a/drivers/firmware/efi/libstub/efistub.h
+++ b/drivers/firmware/efi/libstub/efistub.h
@@ -1150,8 +1150,6 @@ struct efi_image_info {
  */
 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_handle_t image_handle,
 				 const struct efi_image_info **image_info);
diff --git a/drivers/firmware/efi/libstub/loongarch-stub.c b/drivers/firmware/efi/libstub/loongarch-stub.c
index d57e3d3557a5..8f2145bd9ad2 100644
--- a/drivers/firmware/efi/libstub/loongarch-stub.c
+++ b/drivers/firmware/efi/libstub/loongarch-stub.c
@@ -96,8 +96,6 @@ efi_status_t efi_relocate_kernel(unsigned long *image_addr,
 
 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_handle_t image_handle,
 				 const struct efi_image_info **image_info)
diff --git a/drivers/firmware/efi/libstub/riscv-stub.c b/drivers/firmware/efi/libstub/riscv-stub.c
index 840fdd63dccf..8cd0cd9b0048 100644
--- a/drivers/firmware/efi/libstub/riscv-stub.c
+++ b/drivers/firmware/efi/libstub/riscv-stub.c
@@ -12,8 +12,6 @@
 
 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_handle_t image_handle,
 				 const struct efi_image_info **image_info)
-- 
2.56.1.708.g77570a6a1d-goog



  parent reply	other threads:[~2026-11-18 18:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 18:21 [PATCH v4 00/19] efi: Expose loaded image properties via info struct Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 01/19] efi/zboot: arm64: Add missing barrier after cache maintenance Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 02/19] riscv: Use _stext not _text to denote the start of kernel code Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 03/19] riscv: Make _text point to the start of the kernel image Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 04/19] efi/riscv: Rename __init_text_end to __inittext_end like other archs Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 05/19] efi/libstub: Avoid _end section marker in library code Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 06/19] efi/libstub: arm: Size the decompressed kernel allocation precisely Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 07/19] efi/libstub: Avoid reserve_addr/_size in efi_kaslr_relocate_kernel() Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 08/19] efi/libstub: Capture loaded image information in struct efi_image_info Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 09/19] efi/libstub: Pass kernel entrypoint down to efi_enter_kernel() Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 10/19] efi/libstub: arm: Simplify handle_kernel_image() Ard Biesheuvel
2026-11-18 18:21 ` Ard Biesheuvel [this message]
2026-11-18 18:21 ` [PATCH v4 12/19] efi/libstub: arm64: Use struct efi_image_info to access image properties Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 13/19] efi/libstub: loongarch: " Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 14/19] efi/libstub: riscv: " Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 15/19] efi/libstub: Make efi_remap_image() return efi_status_t Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 16/19] efi/zboot: Disentangle efi_remap_image() from efi_cache_sync_image() Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 17/19] efi/libstub: arm64: Drop zboot code_size hack Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 18/19] efi: Make config table based primary display handover ARM-only again Ard Biesheuvel
2026-11-18 18:21 ` [PATCH v4 19/19] Revert "efi: earlycon: Reprobe after parsing config tables" Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118182105.1633603-32-ardb+git@google.com \
    --to=ardb+git@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox