From nobody Fri Apr 3 03:15:51 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E9172D3750 for ; Tue, 17 Feb 2026 08:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771315430; cv=none; b=Ho37XeqL/lAzUZcGpdE0ZcIgH3hJV5aOM2wrBw99lx6OBt5LUa0u/iK3uj/Gl/ej4TcpYNLPLu4nMgFI2TQQrrt4vI3sh9A6T8+IhJH1B5koeucYaotatvkGtuqnrG7gll5co5xFBDNmk7auoK7qArgPfn911rmYL3b4IE19eOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771315430; c=relaxed/simple; bh=fBXwAEZd3nALXEsGIll356q2GrHqcdxNggAcIvQq68k=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=MbVv0dCmyihQQirzY9j1HC4jnZlZEcvLP9A4I+dfQ1wRNYHfZ5SV89vNyMrXyNQAM+OC7k9PyjSp6K7EcNgl6lvuWhlDBp0EeQUnkDMzA0sRZB3wIg7px5c/uElhtYOrtWEwakmRmcfgyVtMsTXd0kwBVqMmxUnCbJYX8LK0cEA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=b7eKWGXa; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b7eKWGXa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771315427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=j4A53eO8aaanQ6ygp53jr6CDnyXo0/FyyAuhKBZ5z/E=; b=b7eKWGXadF0VNdYN0dIDDedXHQue3sOFsPnLdgCu8pEpqapK19JZEsH4q8ri8b8Nwen0Ol YHU6jYfo3ndtKvuOjteLZyihFkcFOllUQ2l2Db7uHkV4VQwXvQHWlEQb3FC/cjweoexkAa FhGV405ektFMxX/IpQxfdrpB+JUy5Sc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-369-E9ebRdzKNZyQE7MxqXtdWg-1; Tue, 17 Feb 2026 03:03:43 -0500 X-MC-Unique: E9ebRdzKNZyQE7MxqXtdWg-1 X-Mimecast-MFC-AGG-ID: E9ebRdzKNZyQE7MxqXtdWg_1771315422 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DA24B1955D88; Tue, 17 Feb 2026 08:03:41 +0000 (UTC) Received: from darkstar.users.ipa.redhat.com (unknown [10.72.116.33]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 60F03180058F; Tue, 17 Feb 2026 08:03:36 +0000 (UTC) Date: Tue, 17 Feb 2026 16:04:14 +0800 From: Dave Young To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org Subject: [PATCH] efi/x86-stub: store acpi_rsdp_addr in bootparams Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Kernel panic occurs during a kexec reboot when EFI runtime services are not enabled in the first kernel. The issue is that the second kernel cannot find the ACPI RSDP address during boot. In legacy boot, the acpi_rsdp_addr is set in early x86 boot code. However, kernel decompression has moved to the EFI stub for EFI boot. Therefore, the x86 EFI stub must also be updated to store the acpi_rsdp_addr in the boot parameters to ensure the kexec kernel can find it. (Note: If the pre-kexec kernel was itself a kexec boot, the later kexec reboot will still utilize the legacy decompressor path, so the original code remains functional though some cleanups can be done later.) Signed-off-by: Dave Young --- drivers/firmware/efi/libstub/x86-stub.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) Index: linux-x86/drivers/firmware/efi/libstub/x86-stub.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- linux-x86.orig/drivers/firmware/efi/libstub/x86-stub.c +++ linux-x86/drivers/firmware/efi/libstub/x86-stub.c @@ -484,6 +484,22 @@ static void setup_quirks(struct boot_par } } =20 +static void setup_acpi_rsdp(struct boot_params *boot_params) +{ + u64 rsdp_addr; + + /* + * Search EFI system tables for RSDP. Preferred is ACPI_20_TABLE_GUID to + * ACPI_TABLE_GUID because it has more features. + */ + rsdp_addr =3D (u64)get_efi_config_table(ACPI_20_TABLE_GUID); + if (!rsdp_addr) + rsdp_addr =3D (u64)get_efi_config_table(ACPI_TABLE_GUID); + + if (rsdp_addr) + boot_params->acpi_rsdp_addr =3D rsdp_addr; +} + static void setup_graphics(struct boot_params *boot_params) { struct screen_info *si =3D memset(&boot_params->screen_info, 0, sizeof(*s= i)); @@ -1017,6 +1033,8 @@ void __noreturn efi_stub_entry(efi_handl =20 setup_graphics(boot_params); =20 + setup_acpi_rsdp(boot_params); + setup_efi_pci(boot_params); =20 setup_quirks(boot_params);