qemu/hw/acpi
Igor Mammedov 1dbfd7892b acpi: fix bios linker loadder COMMAND_ALLOCATE on bigendian host
'make check' fails with:

ERROR:tests/bios-tables-test.c:493:load_expected_aml:
   assertion failed: (g_file_test(aml_file, G_FILE_TEST_EXISTS))

since commit:
caf50c7166
tests: pc: acpi: drop not needed 'expected SSDT' blobs

Assert happens because qemu-system-x86_64 generates
SSDT table and test looks for a corresponding expected
table to compare with.

However there is no expected SSDT blob anymore, since
QEMU souldn't generate one. As it happens BIOS is not
able to read ACPI tables from QEMU and fallbacks to
embeded legacy ACPI codepath, which generates SSDT.
That happens due to wrongly sized endiannes conversion
which makes
 uint8_t BiosLinkerLoaderEntry.alloc.zone
end up with 0 due to truncation of 32 bit integer
which on host is 1 or 2.

Fix it by dropping invalid cpu_to_le32() as uint8_t
doesn't require any conversion.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1330174

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2016-05-01 15:42:13 +03:00
..
acpi_interface.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
aml-build.c acpi: add build_append_named_dword, returning an offset in buffer 2016-03-11 14:54:28 +02:00
bios-linker-loader.c acpi: fix bios linker loadder COMMAND_ALLOCATE on bigendian host 2016-05-01 15:42:13 +03:00
core.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
cpu_hotplug_acpi_table.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
cpu_hotplug.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
ich9.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
Makefile.objs nvdimm acpi: initialize the resource used by NVDIMM ACPI 2016-03-11 16:59:11 +02:00
memory_hotplug_acpi_table.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
memory_hotplug.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
nvdimm.c nvdimm acpi: emulate dsm method 2016-03-11 16:59:11 +02:00
pcihp.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
piix4.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
tco.c x86: Clean up includes 2016-01-29 15:07:22 +00:00