[PATCH v3 0/2] cmd: acpi: fix acpi list command

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sat Nov 18 23:52:46 CET 2023


The size of the ACPI table header is not a multiple of 8. We have to mark
struct acpi_xsdt as packed to correctly access field Entry.

Add a unit test for the offsets of field Entry in the RSDT and XSDT tables.

ACPI tables may comprise either RSDT, XSDT, or both. The current code fails
to check the presence of the RSDT table before accessing it. This leads to
an exception if the RSDT table is not provided.

The XSDT table takes precedence over the RSDT table.

The return values of list_rsdt() and list_rsdp() are always zero and not
checked. Remove the return values.

Addresses in the XSDT table are 64-bit. Adjust the output accordingly.

As the RSDT table has to be ignored if the XSDT command is present there is
no need to compare the tables in a display command. Anyway the
specification does not require that the sequence of addresses in the RSDT
and XSDT table are the same.

The FACS table header does not provide revision information. Correct the
description of dump_hdr().

Adjust the ACPI test to match the changed output format of the 'acpi list'
command.

v3:
	consider map_sysmem(0, 0) != NULL on the sandbox
	adjust signature of list_rsdt() and list_rsdp()
v2:
	merge patch 2 and 3
	remove leading zeros from address output

Heinrich Schuchardt (2):
  acpi: fix struct acpi_xsdt
  cmd: acpi: fix acpi list command

 cmd/acpi.c                | 67 +++++++++++++++++++++------------------
 include/acpi/acpi_table.h |  2 +-
 test/dm/acpi.c            | 28 ++++++++++------
 3 files changed, 56 insertions(+), 41 deletions(-)

-- 
2.40.1



More information about the U-Boot mailing list