aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-11-14 13:51:25 +0200
committerMichael S. Tsirkin <mst@redhat.com>2013-12-10 13:29:22 +0200
commit53db092ad1c81c30a617f44e83e8fb9e27c001ba (patch)
treed2ea7eaff1d6bf76474ab316934096a3e37c5e18
parent53333801e7bb41487147599e1b16b60ebea74695 (diff)
acpi: strip compiler info in built-in DSDT
IASL stores it's revision in each table header it generates. That's not nice since guests will see a change each time they move between hypervisors. We generally fill our own info for tables, but we (and seabios) forgot to do this for the built-in DSDT. Modifications in DSDT table: OEM ID: "BXPC" -> "BOCHS " OEM Table ID: "BXDSDT" -> "BXPCDSDT" Compiler ID: "INTL" -> "BXPC" Compiler Version: 0x20130823 -> 0x00000001 Tested-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--hw/i386/acpi-build.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index befc39f253..48312f5a83 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -924,10 +924,16 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
static void
build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
{
- void *dsdt;
+ AcpiTableHeader *dsdt;
+
assert(misc->dsdt_code && misc->dsdt_size);
+
dsdt = acpi_data_push(table_data, misc->dsdt_size);
memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
+
+ memset(dsdt, 0, sizeof *dsdt);
+ build_header(linker, table_data, dsdt, ACPI_DSDT_SIGNATURE,
+ misc->dsdt_size, 1);
}
/* Build final rsdt table */