[PATCH] x86/kexec: Copy ACPI root pointer address from config table

From: Ard Biesheuvel

Date: Tue Feb 17 2026 - 11:39:22 EST


Dave reports that kexec may fail when the first kernel boots via the EFI
stub but without EFI runtime services, as in that case, the RSDP address
field in struct bootparams is never assigned. Kexec copies this value
into the version of struct bootparams that it provides to the incoming
kernel, which may have no other means to locate the ACPI root pointer.

So take the value from the EFI config tables if no root pointer has been
set in the first kernel's struct bootparams.

Fixes: a1b87d54f4e4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Cc: <stable@xxxxxxxxxxxxxxx> # v6.1
Reported-by: Dave Young <dyoung@xxxxxxxxxx>
Tested-by: Dave Young <dyoung@xxxxxxxxxx>
Link: https://lore.kernel.org/linux-efi/aZQg_tRQmdKNadCg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
Unless anyone minds, I intend to take this via the EFI tree as a fix.

arch/x86/kernel/kexec-bzimage64.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
index 7508d0ccc740..24aec7c1153f 100644
--- a/arch/x86/kernel/kexec-bzimage64.c
+++ b/arch/x86/kernel/kexec-bzimage64.c
@@ -313,6 +313,12 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,

/* Always fill in RSDP: it is either 0 or a valid value */
params->acpi_rsdp_addr = boot_params.acpi_rsdp_addr;
+ if (IS_ENABLED(CONFIG_EFI) && !params->acpi_rsdp_addr) {
+ if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
+ params->acpi_rsdp_addr = efi.acpi20;
+ else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
+ params->acpi_rsdp_addr = efi.acpi;
+ }

/* Default APM info */
memset(&params->apm_bios_info, 0, sizeof(params->apm_bios_info));
--
2.53.0.273.g2a3d683680-goog