Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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@vger.kernel.org> # v6.1
Reported-by: Dave Young <dyoung@redhat.com>
Tested-by: Dave Young <dyoung@redhat.com>
Link: https://lore.kernel.org/linux-efi/aZQg_tRQmdKNadCg@darkstar.users.ipa.redhat.com/
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+7
+7
arch/x86/kernel/kexec-bzimage64.c
··· 193 193 struct efi_info *current_ei = &boot_params.efi_info; 194 194 struct efi_info *ei = &params->efi_info; 195 195 196 + if (!params->acpi_rsdp_addr) { 197 + if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) 198 + params->acpi_rsdp_addr = efi.acpi20; 199 + else if (efi.acpi != EFI_INVALID_TABLE_ADDR) 200 + params->acpi_rsdp_addr = efi.acpi; 201 + } 202 + 196 203 if (!efi_enabled(EFI_RUNTIME_SERVICES)) 197 204 return 0; 198 205