From: Shannon Zhao Date: Thu, 24 Sep 2015 00:29:37 +0000 (+0100) Subject: hw/arm/virt-acpi-build: Fix wrong size of flash in ACPI table X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cd37aaf876717a75d7af3a7465e8706cc4e13661;p=qemu.git hw/arm/virt-acpi-build: Fix wrong size of flash in ACPI table While virt machine creates two flash devices with total size 0x08000000, the ACPI table generation code was wrongly using this total size as the size of each flash device, so it would overlap other MMIO spaces. Make each device entry in the table half the total; this brings the ACPI table into line with the code which generates the device tree and which creates the flash devices themselves. Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones Reviewed-by: Wei Huang Tested-by: Graeme Gregory Message-id: 1442455041-6596-1-git-send-email-shannon.zhao@linaro.org [PMM: edited commit message] Signed-off-by: Peter Maydell --- diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 59c84ff27e..1aaff1f662 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -114,7 +114,7 @@ static void acpi_dsdt_add_flash(Aml *scope, const MemMapEntry *flash_memmap) { Aml *dev, *crs; hwaddr base = flash_memmap->base; - hwaddr size = flash_memmap->size; + hwaddr size = flash_memmap->size / 2; dev = aml_device("FLS0"); aml_append(dev, aml_name_decl("_HID", aml_string("LNRO0015")));