aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-10-03 16:06:24 +0300
committerKevin O'Connor <kevin@koconnor.net>2013-11-19 20:40:23 -0500
commit62335436b649aea80242b6961f23c59b8f989f73 (patch)
treea223cb9860371f4fe435fe52c22f6d9186b13f80
parentce39bd40318203dd30faa1721951596c188e233c (diff)
downloadseabios-62335436b649aea80242b6961f23c59b8f989f73.zip
seabios-62335436b649aea80242b6961f23c59b8f989f73.tar.gz
seabios-62335436b649aea80242b6961f23c59b8f989f73.tar.bz2
acpi: strip compiler info in built-in DSDT if any
IASL stores it's revision in each table header it generates. That's a problem since guests see a change each time they move between hypervisors. We generally fill our own info for tables, but we forgot to do this for the built-in DSDT. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--src/fw/acpi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fw/acpi.c b/src/fw/acpi.c
index 4504a86..042d571 100644
--- a/src/fw/acpi.c
+++ b/src/fw/acpi.c
@@ -676,13 +676,16 @@ acpi_setup(void)
if (CONFIG_ACPI_DSDT && fadt && !fadt->dsdt) {
/* default DSDT */
- void *dsdt = malloc_high(sizeof(AmlCode));
+ struct acpi_table_header *dsdt = malloc_high(sizeof(AmlCode));
if (!dsdt) {
warn_noalloc();
return;
}
memcpy(dsdt, AmlCode, sizeof(AmlCode));
fill_dsdt(fadt, dsdt);
+ /* Strip out compiler-generated header if any */
+ memset(dsdt, 0, sizeof *dsdt);
+ build_header(dsdt, DSDT_SIGNATURE, sizeof(AmlCode), 1);
}
// Build final rsdt table