aboutsummaryrefslogtreecommitdiff
path: root/tests/vmgenid-test.c
diff options
context:
space:
mode:
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");