All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] qfw/acpi & efi_loader: Fix linker cleanup, RSDP bounds, and absent/offset ACPI handling
@ 2026-12-03  2:21 Dan Holmes-Mitra
  2026-12-03  2:21 ` [PATCH 1/4] qfw/acpi: Do not free non-heap addresses on linker error Dan Holmes-Mitra
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dan Holmes-Mitra @ 2026-12-03  2:21 UTC (permalink / raw)
  To: u-boot; +Cc: Tom Rini, Heinrich Schuchardt, Ilias Apalodimas

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03  5:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  2:21 [PATCH 0/4] qfw/acpi & efi_loader: Fix linker cleanup, RSDP bounds, and absent/offset ACPI handling Dan Holmes-Mitra
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

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.