On 09/16/2015 08:57 PM, shannon.z...@linaro.org wrote:
> From: Shannon Zhao <shannon.z...@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.z...@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")));
> 

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 <w...@redhat.com>


Reply via email to