All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	u-boot@lists.denx.de,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH v2 0/2] cmd: acpi: fix acpi list command
Date: Sun, 12 Nov 2023 08:03:14 +0100	[thread overview]
Message-ID: <20231112070316.17982-1-heinrich.schuchardt@canonical.com> (raw)

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.

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.

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                | 48 +++++++++++++++++++++++----------------
 include/acpi/acpi_table.h |  2 +-
 test/dm/acpi.c            | 28 +++++++++++++++--------
 3 files changed, 49 insertions(+), 29 deletions(-)

-- 
2.40.1


             reply	other threads:[~2023-11-12  7:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12  7:03 Heinrich Schuchardt [this message]
2023-11-12  7:03 ` [PATCH v2 1/2] acpi: fix struct acpi_xsdt Heinrich Schuchardt
2023-11-12 20:01   ` Simon Glass
2023-11-12  7:03 ` [PATCH v2 2/2] cmd: acpi: fix acpi list command Heinrich Schuchardt
2023-11-12 20:01   ` Simon Glass
2023-11-18 19:02     ` Heinrich Schuchardt

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=20231112070316.17982-1-heinrich.schuchardt@canonical.com \
    --to=heinrich.schuchardt@canonical.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bmeng.cn@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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.