From: Dan Holmes-Mitra <dholmesm@google.com>
To: u-boot@lists.u-boot-project.org
Cc: Tom Rini <trini@konsulko.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [PATCH 0/4] qfw/acpi & efi_loader: Fix linker cleanup, RSDP bounds, and absent/offset ACPI handling
Date: Thu, 03 Dec 2026 02:21:08 GMT [thread overview]
Message-ID: <20261203022028.04-00-dholmesm@google.com> (raw)
Four targeted fixes for QEMU fw_cfg ACPI loading and EFI ACPI/FDT
registration:
1. qfw/acpi: On BIOS linker error, walk only processed ALLOCATE entries,
free only ZONE_HIGH heap buffers when CONFIG_BLOBLIST_TABLES is
disabled (never bloblist or ZONE_FSEG addresses), and clear ctx->rsdp.
2. qfw/acpi: Compute the 20-byte base RSDP checksum first, guard the
ACPI 2.0 length/ext_checksum writes behind revision >= 2 so 20-byte
ACPI 1.0 RSDPs (e.g. QEMU i440fx) do not overflow by 16 bytes, and
guard NULL in acpi_get_rsdp_addr().
3. qfw/acpi: Skip adding BLOBLISTT_ACPI_TABLES when etc/table-loader is
absent (e.g. QEMU -M virt,acpi=off). Keep the 64 KiB reservation when
CONFIG_BLOBLIST_TABLES is disabled (so default 0x20000 bloblists are
unaffected) and dynamically sum aligned ALLOCATE entry sizes from
etc/table-loader when CONFIG_BLOBLIST_TABLES is enabled.
4. efi_loader: Prefer gd_acpi_start() when non-zero (while falling back
to map_to_sysmem(tab) for prior-stage bloblist ACPI handoffs) so
EFI_ACPI_TABLE_GUID points to the actual RSDP inside BLOBLISTT_ACPI_TABLES,
treat absent runtime ACPI tables (!tab / !gd_acpi_start()) as a
non-fatal no-op in efi_acpi_register(), and check whether
EFI_ACPI_TABLE_GUID was actually installed in efi_install_fdt() so
FDT boot works when firmware supplies no ACPI tables while preserving
EBBR for prior-stage bloblist ACPI handoffs.
Tested:
- Live QEMU arm64 (qemu_arm64_defconfig + CONFIG_ACPI + CONFIG_GENERATE_ACPI_TABLE):
- CONFIG_BLOBLIST_TABLES=y (CONFIG_BLOBLIST_SIZE_RELOC=0x40000), -M virt,acpi=on:
bloblist sized dynamically to 0x21000; `acpi list` and `efidebug tables`
report valid RSDP/XSDT/DSDT/FACP/APIC/GTDT/MCFG/SPCR/DBG2/IORT.
- CONFIG_BLOBLIST_TABLES=y, -M virt,acpi=off: `bloblist list` omits
BLOBLISTT_ACPI_TABLES and `efidebug tables` succeeds cleanly.
- Default CONFIG_BLOBLIST_TABLES=n (CONFIG_BLOBLIST_SIZE_RELOC=0x20000),
-M virt,acpi=on: 0x10000 bloblist, `acpi list` and `efidebug tables` pass.
- Stock qemu-x86_64_defconfig (CONFIG_BLOBLIST_SIZE_RELOC=0x40000, ACPI_SIZE=192K):
built cleanly (no arch/x86/lib/tables.c size change).
- Checked with scripts/checkpatch.pl --strict --u-boot (0 errors, 0 warnings).
Dan Holmes-Mitra (4):
qfw/acpi: Do not free non-heap addresses on linker error
qfw/acpi: Guard ACPI 1.0 RSDP bounds and NULL lookup
qfw/acpi: Skip absent ACPI bloblist and size from table-loader
efi_loader: Handle offset or absent runtime ACPI tables
drivers/misc/qfw_acpi.c | 88 +++++++++++++++++++++++++++++++------
lib/efi_loader/efi_acpi.c | 6 ++-
lib/efi_loader/efi_helper.c | 9 +++-
3 files changed, 87 insertions(+), 16 deletions(-)
base-commit: d1caced3a435607435cb7969e34499051a4ac1e6
--
2.56.1.911.g883d8bcb20-goog
next reply other threads:[~2026-12-03 5:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 2:21 Dan Holmes-Mitra [this message]
2026-12-03 2:21 ` [PATCH 1/4] qfw/acpi: Do not free non-heap addresses on linker error Dan Holmes-Mitra
2026-12-03 2:21 ` [PATCH 2/4] qfw/acpi: Guard ACPI 1.0 RSDP bounds and NULL lookup Dan Holmes-Mitra
2026-12-03 2:21 ` [PATCH 3/4] qfw/acpi: Skip absent ACPI bloblist and size from table-loader Dan Holmes-Mitra
2026-12-03 2:21 ` [PATCH 4/4] efi_loader: Handle offset or absent runtime ACPI tables Dan Holmes-Mitra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203022028.04-00-dholmesm@google.com \
--to=dholmesm@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.