From 4b14d543f3338985fd9c74ae6f6a6d3861c841dd Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 2 May 2019 16:51:50 +0200 Subject: tests: acpi: make acpi_fetch_table() take size of fetched table pointer Currently acpi_fetch_table() assumes 32 bit size of table pointer in ACPI tables. However X_foo variants are 64 bit, prepare acpi_fetch_table() to handle both by adding an argument for addr_ptr pointed entry size. Follow up commits will use that to read XSDT and X_foo entries in ACPI tables. Signed-off-by: Igor Mammedov Message-Id: <1556808723-226478-3-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vmgenid-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/vmgenid-test.c') diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c index f400184..85d8e64 100644 --- a/tests/vmgenid-test.c +++ b/tests/vmgenid-test.c @@ -42,12 +42,12 @@ static uint32_t acpi_find_vgia(QTestState *qts) acpi_fetch_rsdp_table(qts, rsdp_offset, rsdp_table); acpi_fetch_table(qts, &rsdt, &rsdt_len, &rsdp_table[16 /* RsdtAddress */], - "RSDT", true); + 4, "RSDT", true); ACPI_FOREACH_RSDT_ENTRY(rsdt, rsdt_len, ent, 4 /* Entry size */) { uint8_t *table_aml; - acpi_fetch_table(qts, &table_aml, &table_length, ent, NULL, true); + acpi_fetch_table(qts, &table_aml, &table_length, ent, 4, NULL, true); if (!memcmp(table_aml + 16 /* OEM Table ID */, "VMGENID", 7)) { uint32_t vgia_val; uint8_t *aml = &table_aml[36 /* AML byte-code start */]; -- cgit v1.1