aboutsummaryrefslogtreecommitdiff
path: root/tests/acpi-utils.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2019-05-02 16:51:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2019-05-20 18:40:02 -0400
commitf2f616cea44018c8280795f40ce66b04a164dfa8 (patch)
tree466db0525f93f0d218495d5fee79e92d1266d012 /tests/acpi-utils.c
parent4b14d543f3338985fd9c74ae6f6a6d3861c841dd (diff)
tests: acpi: make RSDT test routine handle XSDT
If RSDP revision is more than 0 fetch table pointed by XSDT and fallback to legacy RSDT table otherwise. While at it drop unused acpi_get_xsdt_address(). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1556808723-226478-4-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/acpi-utils.c')
-rw-r--r--tests/acpi-utils.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/acpi-utils.c b/tests/acpi-utils.c
index 644c87b5f9..a0d49c4371 100644
--- a/tests/acpi-utils.c
+++ b/tests/acpi-utils.c
@@ -51,18 +51,6 @@ uint32_t acpi_find_rsdp_address(QTestState *qts)
return off;
}
-uint64_t acpi_get_xsdt_address(uint8_t *rsdp_table)
-{
- uint64_t xsdt_physical_address;
- uint8_t revision = rsdp_table[15 /* Revision offset */];
-
- /* We must have revision 2 if we're looking for an XSDT pointer */
- g_assert(revision == 2);
-
- memcpy(&xsdt_physical_address, &rsdp_table[24 /* XsdtAddress offset */], 8);
- return le64_to_cpu(xsdt_physical_address);
-}
-
void acpi_fetch_rsdp_table(QTestState *qts, uint32_t addr, uint8_t *rsdp_table)
{
uint8_t revision;