qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 6/7] hw/arm/virt-acpi-build: Fix wrong size of flash


From: Peter Maydell
Subject: [Qemu-devel] [PULL 6/7] hw/arm/virt-acpi-build: Fix wrong size of flash in ACPI table
Date: Wed, 23 Sep 2015 22:43:08 +0100

From: Shannon Zhao <address@hidden>

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 <address@hidden>
Reviewed-by: Andrew Jones <address@hidden>
Reviewed-by: Wei Huang <address@hidden>
Tested-by: Graeme Gregory <address@hidden>
Message-id: address@hidden
[PMM: edited commit message]
Signed-off-by: Peter Maydell <address@hidden>
---
 hw/arm/virt-acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 59c84ff..1aaff1f 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")));
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]