qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash
@ 2015-09-17  1:57 shannon.zhao
  2015-09-17  9:28 ` G Gregory
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: shannon.zhao @ 2015-09-17  1:57 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: peter.huangpeng, graeme.gregory, zhaoshenglong

From: Shannon Zhao <shannon.zhao@linaro.org>

While virt machine creates two flash devices with total size 0x08000000,
it wrongly uses this total size for each one. So it will overlap other
MMIO spaces.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
 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 2073573..bc858c8 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")));
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-18 14:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17  1:57 [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash shannon.zhao
2015-09-17  9:28 ` G Gregory
2015-09-17  9:39 ` Andrew Jones
2015-09-17 15:31 ` Wei Huang
2015-09-18 14:45 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).