diff options
author | Igor Mammedov <imammedo@redhat.com> | 2019-05-02 16:51:50 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-05-20 18:40:02 -0400 |
commit | 4b14d543f3338985fd9c74ae6f6a6d3861c841dd (patch) | |
tree | 646d60303735f369187ea216f159faede2b90f28 /tests/vmgenid-test.c | |
parent | 38fb3d7100b871eef3237cba2e4e1fed56d2bd1f (diff) |
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 <imammedo@redhat.com>
Message-Id: <1556808723-226478-3-git-send-email-imammedo@redhat.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c index f400184268..85d8e6463e 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 */]; |