tests: acpi: use AcpiSdtTable::aml instead of AcpiSdtTable::header::signature

AcpiSdtTable::header::signature is the only remained field from
AcpiTableHeader structure used by tests. Instead of using packed
structure to access signature, just read it directly from table
blob and remove no longer used AcpiSdtTable::header / union and
keep only AcpiSdtTable::aml byte array.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Igor Mammedov 2018-12-27 15:13:34 +01:00 committed by Michael S. Tsirkin
parent b997a04a50
commit b137522c35
2 changed files with 10 additions and 16 deletions

View file

@ -13,15 +13,11 @@
#ifndef TEST_ACPI_UTILS_H
#define TEST_ACPI_UTILS_H
#include "hw/acpi/acpi-defs.h"
#include "libqtest.h"
/* DSDT and SSDTs format */
typedef struct {
union {
AcpiTableHeader *header;
uint8_t *aml; /* aml bytecode from guest */
};
uint8_t *aml; /* aml bytecode from guest */
uint32_t aml_len;
gchar *aml_file;
gchar *asl; /* asl code generated from aml */