aboutsummaryrefslogtreecommitdiff
path: root/tests/vmgenid-test.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2018-12-20 16:02:55 +0100
committerMichael S. Tsirkin <mst@redhat.com>2018-12-20 11:18:54 -0500
commitd6caf3631cf561f814aa449bbf9bcb03b86acd2f (patch)
tree45dda06e3a2ebfc08c7dd4af9d9633b6385578c2 /tests/vmgenid-test.c
parenta46ce1c26d5c555b825e9486da422b1ab8f7faa1 (diff)
hw: acpi: Remove AcpiRsdpDescriptor and fix tests
The only remaining AcpiRsdpDescriptor users are the ACPI utils for the BIOS table tests. We remove that dependency and can thus remove the structure itself. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/vmgenid-test.c')
-rw-r--r--tests/vmgenid-test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c
index 84449ce8ae..1c1d435bbd 100644
--- a/tests/vmgenid-test.c
+++ b/tests/vmgenid-test.c
@@ -35,7 +35,7 @@ static uint32_t acpi_find_vgia(QTestState *qts)
{
uint32_t rsdp_offset;
uint32_t guid_offset = 0;
- AcpiRsdpDescriptor rsdp_table;
+ uint8_t rsdp_table[36 /* ACPI 2.0+ RSDP size */];
uint32_t rsdt, rsdt_table_length;
AcpiRsdtDescriptorRev1 rsdt_table;
size_t tables_nr;
@@ -52,9 +52,11 @@ static uint32_t acpi_find_vgia(QTestState *qts)
g_assert_cmphex(rsdp_offset, <, RSDP_ADDR_INVALID);
- acpi_parse_rsdp_table(qts, rsdp_offset, &rsdp_table);
+ acpi_parse_rsdp_table(qts, rsdp_offset, rsdp_table);
+
+ rsdt = acpi_get_rsdt_address(rsdp_table);
+ g_assert(rsdt);
- rsdt = le32_to_cpu(rsdp_table.rsdt_physical_address);
/* read the header */
ACPI_READ_TABLE_HEADER(qts, &rsdt_table, rsdt);
ACPI_ASSERT_CMP(rsdt_table.signature, "RSDT");