On the sandbox efi_acpi_register() used sandbox virtual addressed instead of pointers required by the invoked API function. This lead to EFI applications crashing when trying to access the tables.
The first patch corrects the API invocation. The second patch provides a unit test to ensure we don't do this wrong again. The third patch fixes starts_with() in smbiosdump returning NULL instead of false though the return value is declared as boolean. The fourth patch fixes an incorrect condition for freeing a buffer in dtbdump.c and smbiosdump.c. The next for five patches factor out common code of the EFI apps dbginfodump, dtbdump, initrddump, and smbiosdump. The tenth patch corrects the checksum in the RSDP table. The last patch provides an EFI app to dump ACPI tables. Heinrich Schuchardt (11): efi_loader: use pointers in efi_acpi_register() efi_selftest: add ACPI configuration table test efi_loader: smbiosdump: fix starts_with() returning NULL efi_loader: fix open_file_system() memory leak on fallback path efi_loader: add efi_app_common skeleton efi_loader: move console-input helpers to efi_app_common efi_loader: move string helpers to efi_app_common efi_loader: move file-system helpers to efi_app_common efi_loader: move efi_main and command loop to efi_app_common qfw: fix RSDP ext_checksum recomputation efi_loader: add ACPI table dump EFI app drivers/misc/qfw_acpi.c | 1 + lib/efi_loader/Makefile | 14 +- lib/efi_loader/acpidump.c | 563 +++++++++++++++++++++++++++ lib/efi_loader/dbginfodump.c | 230 +---------- lib/efi_loader/dtbdump.c | 482 ++--------------------- lib/efi_loader/efi_acpi.c | 35 +- lib/efi_loader/efi_app_common.c | 415 ++++++++++++++++++++ lib/efi_loader/efi_app_common.h | 136 +++++++ lib/efi_loader/initrddump.c | 406 +------------------ lib/efi_loader/smbiosdump.c | 466 ++-------------------- lib/efi_selftest/Makefile | 1 + lib/efi_selftest/efi_selftest_acpi.c | 138 +++++++ 12 files changed, 1380 insertions(+), 1507 deletions(-) create mode 100644 lib/efi_loader/acpidump.c create mode 100644 lib/efi_loader/efi_app_common.c create mode 100644 lib/efi_loader/efi_app_common.h create mode 100644 lib/efi_selftest/efi_selftest_acpi.c -- 2.53.0

