summaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-03-12 16:13:58 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-03-12 17:12:00 +0200
commiteee822e3595bbdd69e71198edd65dd29db27a6e5 (patch)
tree7362bfe2b81d9a9427f1bbfac677dbe93ab66b0b /hw/i386
parent13f65b2e1073cf7e2c8fb3880c77d8a53fa2f95e (diff)
downloadqemu-eee822e3595bbdd69e71198edd65dd29db27a6e5.tar.gz
acpi-build: fix misaligned access
clang build reported a misaligned access: runtime error: store to misaligned address 0x2b5aa47dfb19 for type 'uint16_t' (aka 'unsigned short'), which requires 2 byte alignment 0x2b5aa47dfb19: note: pointer points here 45 53 54 0b ff ff 5b 80 50 45 4f 52 01 50 45 53 54 01 5b 81 0b 50 45 4f 52 01 50 45 50 54 08 14 fix this up Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/acpi-build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 7ecfd7004b..4d781a1687 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1019,8 +1019,8 @@ build_ssdt(GArray *table_data, GArray *linker,
patch_pci_windows(pci, ssdt_ptr, sizeof(ssdp_misc_aml));
- *(uint16_t *)(ssdt_ptr + *ssdt_isa_pest) =
- cpu_to_le16(misc->pvpanic_port);
+ ACPI_BUILD_SET_LE(ssdt_ptr, sizeof(ssdp_misc_aml),
+ ssdt_isa_pest[0], 16, misc->pvpanic_port);
{
GArray *sb_scope = build_alloc_array();