@@ -279,8 +279,19 @@ static void dump_aml_files(test_data *data, bool rebuild)
}
g_assert(fd >= 0);
+ sdt->header.signature = cpu_to_le32(sdt->header.signature);
+ sdt->header.length = cpu_to_le32(sdt->header.length);
+ sdt->header.oem_revision = cpu_to_le32(sdt->header.oem_revision);
+ sdt->header.asl_compiler_revision = cpu_to_le32(sdt->header.asl_compiler_revision);
+
ret = qemu_write_full(fd, sdt, sizeof(AcpiTableHeader));
g_assert(ret == sizeof(AcpiTableHeader));
+
+ sdt->header.signature = le32_to_cpu(sdt->header.signature);
+ sdt->header.length = le32_to_cpu(sdt->header.length);
+ sdt->header.oem_revision = le32_to_cpu(sdt->header.oem_revision);
+ sdt->header.asl_compiler_revision = le32_to_cpu(sdt->header.asl_compiler_revision);
+
ret = qemu_write_full(fd, sdt->aml, sdt->aml_len);
g_assert(ret == sdt->aml_len);