From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FF7D606A32C for ; Thu, 3 Dec 2026 05:03:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=F7zlFq5I; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Ff4UL3/l Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5CC9385D74; Thu, 3 Dec 2026 05:03:59 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nMOVaYowKwWN; Thu, 3 Dec 2026 05:03:58 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 95F5F85A6C Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796274238; b=Znt0e7CHEJZLCOlgvqgyJKS5D/f5jfM6atgNJnYiiqlBpZid++txCAQ9U8dbV3szFZOH yeRs9J+HvMTvpyDzQwaloKQkXbG8pY3yJeeDuGzyy/mduHIrMuXksxHbF+RuFjWqktYZB 8+B/o6bzNxF+WKTxsW7x/GEmEdIc2iCS0Kp+PYJJl2MfunQSsYDrm2Llsyh4w5gqCWFXF kJOlC9YLQdZIQwUkBGuzP/bS6Jo2e79GPL6Cjb81CP+sx8LHJGZn38ADJnsV28csVOAs1 yc3t/OLfw/feR6hBlZRWpb6bR+2BxrmztkNlKe9ZN1U1K4h3RbcDPJX3Fww2kNf8NNg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796274238; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Received: Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:To: Cc:Content-Type:X-Mailman-Approved-At:X-BeenThere:X-Mailman-Version: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=9IKlWMf980Tb4x78zRPZQykL3UC3CV46dxB3qBsL1XE=; b=EFUCiAjTXWxCZ1hStf/nSOnqrozBvHVTvXmF7STdwhDCqR7dHv7pqKbTmOCFMSydMTgo iXbnrovff79WbJI1pnJ/flomiGkHrwwT+U+gwrNfFXfUBxVmzjrhLi9ZrAUZ6c5P77ftI 1TAC1ce4jsIehhnXmyuXvP3Ca/cwm4/b9TsilwlPWPpsXpoJsdQ/a1LeSYcDR7hj1P4DN Wh7PDLFo9nOryYUexbAnie+xsAgsGuMYmzDIz6zErB0Q72gTEeLsE/YBT+1LlSr75HoAl xnGx7u62V5grdUtgvZx2RBY+t902Yp7BjhW3IApbchYBNi4rmep/aU5zjbf75U+mphg== ARC-Authentication-Results: i=1; smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796274238; bh=9IKlWMf980Tb4x78zRPZQykL3UC3CV46dxB3qBsL1XE=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F7zlFq5ILw/Nlj30hu2EsveH837xwMrQ4nw9ZH4CN2DbNNI3+h9pl9VLAA0Pdc7Gp 5Jba0SxCuu4hCSvKXevoLholFixUIfVvOkQtFY6cEjyg2lUkw4kxcrJ2BVQatGq6dR vXqg9TgvJdvYX6D4UkRUnUSQup5Y/uoR/g9WTXUHYAL8QRmKj2ziGEK1EgkudsJ4Wf 4gR9bXrQrMFa0Yw/gsysrD69zaGDclFYrGOSEE1azPEuE1cC2gxDLNEB+eg+DsfQtS 9WzRiDNJstRt1D6Yxdh5ljbhyvccbtJB2Bx6XZr2oNbTQcXSLZW3nn3fqKGigxzRKU Thkie62GnDyIQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 95F5F85A6C; Thu, 3 Dec 2026 05:03:58 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id F1CF939B for ; Thu, 3 Dec 2026 02:22:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E3D5250482 for ; Thu, 3 Dec 2026 02:22:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id anWGJCS7srZS for ; Thu, 3 Dec 2026 02:22:16 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 3732D50479 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::1247" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::1247; helo=mail-dl1-x1247.google.com; envelope-from=3vdiqawgkbpw9dkhiaoickkcha.8kiq-7kkpheopo.q-7kkp-lnkfa8p.knc@flex--dholmesm.bounces.google.com; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Ff4UL3/l Received: from mail-dl1-x1247.google.com (mail-dl1-x1247.google.com [IPv6:2607:f8b0:4864:20::1247]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3732D50479 for ; Thu, 3 Dec 2026 02:22:15 +0000 (UTC) Received: by mail-dl1-x1247.google.com with SMTP id a92af1059eb24-1b587ffea77so956125c88.1 for ; Wed, 02 Dec 2026 18:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796264535; x=1796869335; darn=lists.u-boot-project.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9IKlWMf980Tb4x78zRPZQykL3UC3CV46dxB3qBsL1XE=; b=Ff4UL3/lm6rFAG4iTKcAsM+lnzvBVNHBrjRCwfP+gvYf5hGrzox6C1Gp4tdaCHzDgw 8J6VQdbNfdNylavq3GvHGgmBLlgSz5LO2WgeZmYBuCbFSnwmgovI5REohBsSK5lPLC/f 8AsRt434+ysAzKo7VRKcaqXR9CDo4etee9zgGtjZkTIMFXZC+VC5cPY22qdZcerOUq/D qWPb/xpLYPT91oLvMzZRi+Uz4JUie8fNeccDmfTLoj3zox73uMUJFfHb6PcaXXT7D78U pLsvHiR9dj1Ko3FJyJPoyp3tajm5CP2SGfZhqsARdq5Nwo5AmYLow/OkamTK376W+JkR nQtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796264535; x=1796869335; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9IKlWMf980Tb4x78zRPZQykL3UC3CV46dxB3qBsL1XE=; b=DRDeOV5/mzk+sVPjvm67qm3B7gInIIdFtiwrxrRYLH8wPUOwsxalc55p2NtixVBXQl etaNaKXMESHFc8o9877oJv3O23IwfUkioExv/9KI3948C/xlt+Hz5IqA+87CmexOybsJ tTM8YSziCaaBobUwC/VZx2IGAsiLXiOJnw0Fto6TgyLJxd4xxvLfGq4+Uw/Pbd2O1Cs4 zxueJzv0rVA4oncPrAEQodUE6IJ8pN0WgNGI06PT/g8J089nKD5sZT7Z4l/FM7V+qDKa Xv39iYdoSLDJGw8yjyCJimd6wnPzXn3ujK0rYMQgqbLZleA3177dMyrkJftbnPRxqhTY vw6Q== X-Gm-Message-State: APuU4Z9KHIJsaWsfGQbptA3NhlKwIE3JSjkNKhYUZHrmJbr5MxUD2H5N 3Wj6hVT7vGrcsLD1d7lOCzpmM0AKvSRKoMX8AsV9Vl5F1lDVGcXwALbz+C98y+AKEKF2RYB0xBV rLbJIhruRkXiO0WO8Pe1xV8WNHl+JFVaIbxJH7tuPyr+QntMuJTn8i/hFd/TR67t3I3BLMQ4hBE ZHxwFpMu73Y/Zsl+0Zzt2Y1M1NWUXagoyDstRS5+YAWE6MaddxhMsY0fn+AtY= X-Received: from dybqf1.prod.google.com ([2002:a05:7301:6481:b0:387:14f8:97d1]) (user=dholmesm job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:b886:b0:19c:c396:37aa with SMTP id a92af1059eb24-1b5568e1d36mr37267977c88.22.1796264533749; Wed, 02 Dec 2026 18:22:13 -0800 (PST) Date: Thu, 03 Dec 2026 02:21:12 GMT In-Reply-To: <20261203022028.04-00-dholmesm@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261203022028.04-00-dholmesm@google.com> Message-ID: <20261203022028.04-04-dholmesm@google.com> Subject: [PATCH 4/4] efi_loader: Handle offset or absent runtime ACPI tables From: Dan Holmes-Mitra To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Heinrich Schuchardt , Ilias Apalodimas Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 03 Dec 2026 05:03:38 +0000 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-23.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 When QFW loads QEMU ACPI tables into BLOBLISTT_ACPI_TABLES, the RSDP is placed after etc/acpi/tables rather than at offset 0 of the bloblist. efi_acpi_register() previously passed map_to_sysmem(tab) to efi_install_configuration_table() instead of gd_acpi_start(), handing payloads raw DSDT/FACP bytes instead of the RSDP. Prefer gd_acpi_start() when non-zero (while falling back to map_to_sysmem(tab) so prior-stage bloblist ACPI handoffs keep working), and treat absent runtime ACPI tables (!tab in bloblist mode, or !gd_acpi_start() otherwise) as a non-fatal no-op in efi_acpi_register(). In efi_install_fdt(), check whether EFI_ACPI_TABLE_GUID was actually installed so platforms built with CONFIG_GENERATE_ACPI_TABLE fall back to FDT when no ACPI tables exist while still honoring EBBR for prior-stage bloblist ACPI handoffs. Signed-off-by: Dan Holmes-Mitra --- lib/efi_loader/efi_acpi.c | 6 +++++- lib/efi_loader/efi_helper.c | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c index 046986a751..af7b38934e 100644 --- a/lib/efi_loader/efi_acpi.c +++ b/lib/efi_loader/efi_acpi.c @@ -40,14 +40,18 @@ efi_status_t efi_acpi_register(void) void *tab = bloblist_get_blob(BLOBLISTT_ACPI_TABLES, &size); if (!tab) - return EFI_NOT_FOUND; + return EFI_SUCCESS; addr = map_to_sysmem(tab); ret = efi_add_memory_map(addr, size, EFI_ACPI_RECLAIM_MEMORY); if (ret != EFI_SUCCESS) return ret; + if (gd_acpi_start()) + addr = gd_acpi_start(); } else { + if (!gd_acpi_start()) + return EFI_SUCCESS; /* Mark space used for tables */ start = ALIGN_DOWN(gd->arch.table_start, EFI_PAGE_MASK); end = ALIGN(gd->arch.table_end, EFI_PAGE_MASK); diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 44b806aadc..928863af66 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -544,14 +544,19 @@ void *efi_get_configuration_table(const efi_guid_t *guid) */ efi_status_t efi_install_fdt(void *fdt) { + static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID; struct bootm_headers img = { 0 }; + bool has_acpi; efi_status_t ret; + has_acpi = CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) && + efi_get_configuration_table(&acpi_guid); + /* * The EBBR spec requires that we have either an FDT or an ACPI table * but not both. */ - if (CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) && fdt) + if (has_acpi && fdt) log_warning("Can't have ACPI table and device tree - ignoring DT.\n"); if (fdt == EFI_FDT_USE_INTERNAL) { @@ -582,7 +587,7 @@ efi_status_t efi_install_fdt(void *fdt) return EFI_LOAD_ERROR; } - if (CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE)) { + if (has_acpi) { /* Create memory reservations as indicated by the device tree */ efi_carve_out_dt_rsv(fdt); return EFI_SUCCESS; -- 2.56.1.911.g883d8bcb20-goog