From: "Michael S. Tsirkin" <mst@redhat.com>
To: Marcel Apfelbaum <marcel.a@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-1.7 1/5] acpi unit-test: load and check facs table
Date: Tue, 10 Dec 2013 18:42:29 +0200 [thread overview]
Message-ID: <20131210164229.GA2112@redhat.com> (raw)
In-Reply-To: <1385062405-3800-2-git-send-email-marcel.a@redhat.com>
On Thu, Nov 21, 2013 at 09:33:21PM +0200, Marcel Apfelbaum wrote:
> FACS table does not have a checksum, so we can
> check at least the signature (existence).
>
> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Applied, thanks.
> ---
> tests/acpi-test.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tests/acpi-test.c b/tests/acpi-test.c
> index d6ff66f..43775cd 100644
> --- a/tests/acpi-test.c
> +++ b/tests/acpi-test.c
> @@ -30,6 +30,7 @@ typedef struct {
> AcpiRsdpDescriptor rsdp_table;
> AcpiRsdtDescriptorRev1 rsdt_table;
> AcpiFadtDescriptorRev1 fadt_table;
> + AcpiFacsDescriptorRev1 facs_table;
> uint32_t *rsdt_tables_addr;
> int rsdt_tables_nr;
> AcpiSdtTable dsdt_table;
> @@ -252,6 +253,22 @@ static void test_acpi_fadt_table(test_data *data)
> g_assert(!acpi_checksum((uint8_t *)fadt_table, fadt_table->length));
> }
>
> +static void test_acpi_facs_table(test_data *data)
> +{
> + AcpiFacsDescriptorRev1 *facs_table = &data->facs_table;
> + uint32_t addr = data->fadt_table.firmware_ctrl;
> +
> + ACPI_READ_FIELD(facs_table->signature, addr);
> + ACPI_READ_FIELD(facs_table->length, addr);
> + ACPI_READ_FIELD(facs_table->hardware_signature, addr);
> + ACPI_READ_FIELD(facs_table->firmware_waking_vector, addr);
> + ACPI_READ_FIELD(facs_table->global_lock, addr);
> + ACPI_READ_FIELD(facs_table->flags, addr);
> + ACPI_READ_ARRAY(facs_table->resverved3, addr);
> +
> + g_assert_cmphex(facs_table->signature, ==, ACPI_FACS_SIGNATURE);
> +}
> +
> static void test_dst_table(AcpiSdtTable *sdt_table, uint32_t addr)
> {
> uint8_t checksum;
> @@ -329,6 +346,7 @@ static void test_acpi_one(const char *params)
> test_acpi_rsdp_table(&data);
> test_acpi_rsdt_table(&data);
> test_acpi_fadt_table(&data);
> + test_acpi_facs_table(data);
> test_acpi_dsdt_table(&data);
> test_acpi_ssdt_tables(&data);
>
> --
> 1.8.3.1
next prev parent reply other threads:[~2013-12-10 16:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 19:33 [Qemu-devel] [PATCH for-1.7 0/5] acpi unit-test: added tests Marcel Apfelbaum
2013-11-21 19:33 ` [Qemu-devel] [PATCH for-1.7 1/5] acpi unit-test: load and check facs table Marcel Apfelbaum
2013-12-10 16:42 ` Michael S. Tsirkin [this message]
2013-11-21 19:33 ` [Qemu-devel] [PATCH for-1.7 2/5] acpi unit-test: adjust the test data structure for better handling Marcel Apfelbaum
2013-12-10 16:42 ` [Qemu-devel] (no subject) Michael S. Tsirkin
2013-11-21 19:33 ` [Qemu-devel] [PATCH for-1.7 3/5] acpi unit-test: add test files Marcel Apfelbaum
2013-12-10 16:45 ` Michael S. Tsirkin
2013-12-11 9:23 ` Marcel Apfelbaum
2013-12-11 10:35 ` Michael S. Tsirkin
2013-11-21 19:33 ` [Qemu-devel] [PATCH for-1.7 4/5] configure: added acpi unit-test files Marcel Apfelbaum
2013-11-21 19:33 ` [Qemu-devel] [PATCH for-1.7 5/5] acpi unit-test: compare DSDT and SSDT tables against expected values Marcel Apfelbaum
2013-11-21 21:20 ` [Qemu-devel] [PATCH for-1.7 0/5] acpi unit-test: added tests Erik Rull
2013-11-21 21:30 ` Marcel Apfelbaum
2013-11-21 21:40 ` Erik Rull
2013-11-24 11:32 ` Michael S. Tsirkin
2013-11-24 11:33 ` Michael S. Tsirkin
2013-11-24 11:37 ` Marcel Apfelbaum
2013-11-24 11:46 ` Michael S. Tsirkin
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=20131210164229.GA2112@redhat.com \
--to=mst@redhat.com \
--cc=marcel.a@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.