[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/28] acpi unit-test: load and check facs table
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 25/28] acpi unit-test: load and check facs table |
Date: |
Wed, 11 Dec 2013 20:31:32 +0200 |
From: Marcel Apfelbaum <address@hidden>
FACS table does not have a checksum, so we can
check at least the signature (existence).
Signed-off-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
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);
--
MST
- [Qemu-devel] [PULL 11/28] exec: extend skip field to 6 bit, page entry to 32 bit, (continued)
- [Qemu-devel] [PULL 11/28] exec: extend skip field to 6 bit, page entry to 32 bit, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 12/28] exec: pass hw address to phys_page_find, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 13/28] exec: memory radix tree page level compression, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 15/28] exec: reduce L2_PAGE_SIZE, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 16/28] smbios: Set system manufacturer, product & version by default, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 21/28] hpet: inverse polarity when pin above ISA_NUM_IRQS, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 23/28] memory.c: bugfix - ref counting mismatch in memory_region_find, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 24/28] exec: separate sections and nodes per address space, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 22/28] hpet: enable to entitle more irq pins for hpet, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 25/28] acpi unit-test: load and check facs table,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 26/28] acpi unit-test: adjust the test data structure for better handling, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 28/28] pc: use macro for HPET type, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 27/28] hpet: fix build with CONFIG_HPET off, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 17/28] acpi unit-test: verify signature and checksum, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 20/28] pci: fix pci bridge fw path, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 18/28] acpi: strip compiler info in built-in DSDT, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 19/28] ACPI DSDT: Make control method `IQCR` serialized, Michael S. Tsirkin, 2013/12/11