From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcb9X-0006eb-T1 for qemu-devel@nongnu.org; Thu, 17 Sep 2015 11:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcb9W-0002zF-UF for qemu-devel@nongnu.org; Thu, 17 Sep 2015 11:31:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcb9W-0002ul-Pu for qemu-devel@nongnu.org; Thu, 17 Sep 2015 11:31:14 -0400 References: <1442455041-6596-1-git-send-email-shannon.zhao@linaro.org> From: Wei Huang Message-ID: <55FADCBF.7090701@redhat.com> Date: Thu, 17 Sep 2015 10:31:11 -0500 MIME-Version: 1.0 In-Reply-To: <1442455041-6596-1-git-send-email-shannon.zhao@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: shannon.zhao@linaro.org, qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: peter.huangpeng@huawei.com, graeme.gregory@linaro.org, zhaoshenglong@huawei.com On 09/16/2015 08:57 PM, shannon.zhao@linaro.org wrote: > From: Shannon Zhao > > 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 > --- > 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"))); > In current code, it looks like both FLS0 and FLS1 are using up the whole space. That would invade into the VIRT_CPUPERIPHS address space, which apparently is wrong. Reviewed-by: Wei Huang