From patchwork Wed Aug 20 15:22:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 93 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703354; bh=CIgKaTtLy3IF0yC6U6X0EpWOx7yA0qu/WoK+EJ3IUow=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ENjmeUPQKRkjBkwi/zrPVpof8jQCLeU3z8tAN1haSEQ8qxd95EDd48ERNCz1tGIzJ xXk9jdzR8EUxP4V+WwBhDtCpWzSUbgaaaYuaAkuxLsupS4iPC4+F5lOCzW5acRQyHH Kk8pdWqL4xfenGxg/WUgedqCE2Dk/eGv5//mvFam5C8jBr1oEi/h8PdlO0GLxqFqsn ji9VNyOnxdg1rGhHiRbsCa29jDoSxC7x4bFOfYbS2EA40Ok/2zySrn7VqHAcftymhs YqR4FZ8ZLeK1ZD+GgBNamHRk+/P2213ne4+e1UEIr7sFmU3tN2Jdl2jtwvEYc0dPzQ i0ByDYf2P4NEQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E45406768B for ; Wed, 20 Aug 2025 09:22:34 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id q1BeZCNYwx31 for ; Wed, 20 Aug 2025 09:22:34 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703354; bh=CIgKaTtLy3IF0yC6U6X0EpWOx7yA0qu/WoK+EJ3IUow=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ENjmeUPQKRkjBkwi/zrPVpof8jQCLeU3z8tAN1haSEQ8qxd95EDd48ERNCz1tGIzJ xXk9jdzR8EUxP4V+WwBhDtCpWzSUbgaaaYuaAkuxLsupS4iPC4+F5lOCzW5acRQyHH Kk8pdWqL4xfenGxg/WUgedqCE2Dk/eGv5//mvFam5C8jBr1oEi/h8PdlO0GLxqFqsn ji9VNyOnxdg1rGhHiRbsCa29jDoSxC7x4bFOfYbS2EA40Ok/2zySrn7VqHAcftymhs YqR4FZ8ZLeK1ZD+GgBNamHRk+/P2213ne4+e1UEIr7sFmU3tN2Jdl2jtwvEYc0dPzQ i0ByDYf2P4NEQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D2D2D674F4 for ; Wed, 20 Aug 2025 09:22:34 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703352; bh=ld3GAtj9VOLWnsIfxwMx91EaXbVlaF5VUDIIVB2d2V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZrIlhNtFQBqpHP4VYcp+4CgEX4bOtAqirJzn+fEfJqGHKIDwImnXQe5/lBUMXYcmP mlzUEFOsxyZ7weCdYJmscwqiSEAdAPQS0PIG0XMTey1USw7GyCvoHm5TPs6Nc55Nht DTkOGdY8SFsMtIfraoTb6IzcoM+tlXo25Xz27/4eIgssimLMwjV+sEYqK4MW+Oa1T1 5qFQE8zmpCYACJxcEC/wCpW5jb+hpAhhCp1ArDipfCpfe9KcpCr7IWelgMDZ3zugX0 /rFdRcDJe7DuxGG4TGmt6VQUFJmt/ST7+0yUM5S0cldBNGB3HWl8uiRw7fsNRL/0OH Kc0IkVZmcEI/g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 76EB567696; Wed, 20 Aug 2025 09:22:32 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id EPPQJVbly_Fz; Wed, 20 Aug 2025 09:22:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755703350; bh=Pf54ijqDt9avD0ApHbpD/FJg8dFbcvYJo06YZ01N76Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kcaBzVEt3qJZ1+zW4gbR42vhWT+VXull8BssVI9ks76DxgcLSufeh3FD9hMBynBpV URJMSwc6C9q5tbYsgtLwrztNMgS6LvPER4r03tzuHM0VzdYnWZL5BEOc+oLgDuN9PF vAs3Rlin3YN5TK6PBgiiHcmotDVflgHQGzjrrmthDmakJMn2euCiyIQCWXyNttNnx+ N7tRFoKOvOA+RFiH8Qx0+PTN8CF8OYkIItwTW2PZO8mfTM7RsyF2BpAxn5D89gHd+6 xp5jpJ6dzU7wKf4K9cRG0enK/l6jRe7IUcVSoYm7VAxP8TbWkyigTEDTrSyyfoU8Ol dg/9lpoxf6JoQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A6D286768B; Wed, 20 Aug 2025 09:22:30 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 09:22:17 -0600 Message-ID: <20250820152223.1569324-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820152223.1569324-1-sjg@u-boot.org> References: <20250820152223.1569324-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: IBPIMBE6Z3ZVXSW76E4G37NEJKAVIB6H X-Message-ID-Hash: IBPIMBE6Z3ZVXSW76E4G37NEJKAVIB6H X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 2/5] acpi: Explain why boot-services data is used for BGRT image List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass There is some conflicting documentation here, so add a comment about this. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to explain why boot-services data is used for BGRT image lib/acpi/acpi_extra.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/acpi/acpi_extra.c b/lib/acpi/acpi_extra.c index 7620f953add..43962094ef9 100644 --- a/lib/acpi/acpi_extra.c +++ b/lib/acpi/acpi_extra.c @@ -61,7 +61,16 @@ int acpi_write_bgrt(struct acpi_ctx *ctx) /* Image Type: 0 = Bitmap */ bgrt->image_type = 0; - /* Mark space used for tables */ + /* + * Mark space used for tables. The EFI spec says "ACPI Tables loaded at + * boot time can be contained in memory of type EfiACPIReclaimMemory + * (recommended) or EfiACPIMemoryNVS. The ACPI spec says "The image + * should be stored in EfiBootServicesData, allowing the system to + * reclaim the memory when the image is no longer needed. Linux checks + * for EfiBootServicesData and ignores the image if it is anything else. + * + * So use EFI_BOOT_SERVICES_DATA here. + */ eret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, size, &buf); if (eret) return -ENOMEM;