qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: shannon.zhao@linaro.org
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: peter.huangpeng@huawei.com, graeme.gregory@linaro.org,
	zhaoshenglong@huawei.com
Subject: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash
Date: Thu, 17 Sep 2015 09:57:21 +0800	[thread overview]
Message-ID: <1442455041-6596-1-git-send-email-shannon.zhao@linaro.org> (raw)

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

             reply	other threads:[~2015-09-17  1:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  1:57 shannon.zhao [this message]
2015-09-17  9:28 ` [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash G Gregory
2015-09-17  9:39 ` Andrew Jones
2015-09-17 15:31 ` Wei Huang
2015-09-18 14:45 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442455041-6596-1-git-send-email-shannon.zhao@linaro.org \
    --to=shannon.zhao@linaro.org \
    --cc=graeme.gregory@linaro.org \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhaoshenglong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).