From patchwork Thu Sep 17 01:57:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 53772 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 32E2822A0D for ; Thu, 17 Sep 2015 01:58:04 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf2157528wic.2 for ; Wed, 16 Sep 2015 18:58:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=EfAEoGaSke7r72Y+K/xrD3hDFPUERu18I0LmZ2emMQU=; b=MMRGulDXcUEQSYqp7vyWx4eyJxGwgYBsl5s+S3NjAtWYEf09HjIw8E77/6RGwdVX+1 lGt4upJ44OpNu64xNZfVsYSxeKRWEi/5930S7E4dOlzBjGcQT3L8mhqa4OH+5+qILjR+ 9GytTWTW9m4SCEf3D/x697ISwrrsD7/sTy4akVmh5YU8KdBPJjsIaGvq/MJshrTIHmLn 7Ixq62aOqQV+zDCgDdHg4OuZGURjI3RQ2WAEVLP42juN1lpuCbntls30PBC6pg+DkKfM tO9uFHv365NWh/xc3JjnZCk86KiMZQVU6vkmAjilwcweLjMbnrLbzq0r9Gt0IFzESFvX EhHA== X-Gm-Message-State: ALoCoQnY7S1nUnlxHZr0iDKJxTCzho5r+B+r6c/UyZHyh+gmEp0xsb/mM2RloMZ3wwcZR62xuRHK X-Received: by 10.180.99.196 with SMTP id es4mr220080wib.1.1442455083456; Wed, 16 Sep 2015 18:58:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.66 with SMTP id x2ls19643laa.107.gmail; Wed, 16 Sep 2015 18:58:03 -0700 (PDT) X-Received: by 10.152.44.202 with SMTP id g10mr4477873lam.33.1442455083282; Wed, 16 Sep 2015 18:58:03 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id u1si578987lae.77.2015.09.16.18.58.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 18:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lanb10 with SMTP id b10so2305237lan.3 for ; Wed, 16 Sep 2015 18:58:02 -0700 (PDT) X-Received: by 10.112.146.104 with SMTP id tb8mr31356780lbb.35.1442455082856; Wed, 16 Sep 2015 18:58:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2793961lbq; Wed, 16 Sep 2015 18:58:02 -0700 (PDT) X-Received: by 10.50.28.8 with SMTP id x8mr1795079igg.49.1442455081922; Wed, 16 Sep 2015 18:58:01 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id it6si382442igb.61.2015.09.16.18.58.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Sep 2015 18:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:55131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcOSW-0008BL-PP for patch@linaro.org; Wed, 16 Sep 2015 21:58:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcOS9-0007s0-Sv for qemu-devel@nongnu.org; Wed, 16 Sep 2015 21:57:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcOS6-0004zM-Lk for qemu-devel@nongnu.org; Wed, 16 Sep 2015 21:57:37 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:34439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcOS6-0004yt-G7 for qemu-devel@nongnu.org; Wed, 16 Sep 2015 21:57:34 -0400 Received: by wicfx3 with SMTP id fx3so4231177wic.1 for ; Wed, 16 Sep 2015 18:57:32 -0700 (PDT) X-Received: by 10.180.219.106 with SMTP id pn10mr2539186wic.56.1442455052440; Wed, 16 Sep 2015 18:57:32 -0700 (PDT) Received: from localhost ([87.117.204.88]) by smtp.gmail.com with ESMTPSA id bq7sm628335wjc.31.2015.09.16.18.57.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Sep 2015 18:57:31 -0700 (PDT) From: shannon.zhao@linaro.org To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Thu, 17 Sep 2015 09:57:21 +0800 Message-Id: <1442455041-6596-1-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.179 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 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 Tested-by: Graeme Gregory Reviewed-by: Andrew Jones Reviewed-by: Wei Huang --- 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")));