From patchwork Wed Sep 23 21:43:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 54079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id B812222B1E for ; Wed, 23 Sep 2015 21:44:29 +0000 (UTC) Received: by lacao8 with SMTP id ao8sf19582751lac.3 for ; Wed, 23 Sep 2015 14:44:28 -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:in-reply-to:references: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=SJHbrUrv4wbul3t3oVCVu+e/qmvrP7Sx4iyM018Ts+I=; b=Fmnh/keMgyG4obGnwsJY2iJQlksvfhgY+F+XMQ8hdnjACq8PDfgUeFx6niNRMgk1Xv /u0QR3kkN6u6ONrFNalQZ9TjJUveA/UPB/CBDHx4VD+/AmLtPWjSH+f2vEJQ63EgNnXc C+Cb0mhFl/e+7VzhUkXAF9wnYqKDb4N1jQrwPnEhNh5gh+OZvXg+boqJhsGu5x5A4Sdc kPxt3uQsB9nmqo8R8wFdvYnkIrlroSRg2a8LdKFrHhBBEo8er5pE9PsKDVoC+mLPPSp1 Ghax80a/GnQxz8LoRIkypSaTW5MVS5hrbqHpuXlJLx5wZnOxXj+Ytq/C7UOTHCnBH83g w4Eg== X-Gm-Message-State: ALoCoQk3SlwdohUuybTKwCKC9+edgr5nzDL9HOo2Xn5pUEHqzuFkUD/IsfqYPphle9+mqQWJRoH/ X-Received: by 10.112.132.6 with SMTP id oq6mr5570337lbb.1.1443044668629; Wed, 23 Sep 2015 14:44:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.7 with SMTP id e7ls72181lab.70.gmail; Wed, 23 Sep 2015 14:44:28 -0700 (PDT) X-Received: by 10.25.17.149 with SMTP id 21mr4349280lfr.38.1443044668363; Wed, 23 Sep 2015 14:44:28 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id nb5si3242075lbb.35.2015.09.23.14.44.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 14:44:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lahg1 with SMTP id g1so66889676lah.1 for ; Wed, 23 Sep 2015 14:44:28 -0700 (PDT) X-Received: by 10.25.210.206 with SMTP id j197mr4470850lfg.86.1443044668249; Wed, 23 Sep 2015 14:44:28 -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 w3csp5726lbq; Wed, 23 Sep 2015 14:44:27 -0700 (PDT) X-Received: by 10.180.87.198 with SMTP id ba6mr6553274wib.39.1443044666979; Wed, 23 Sep 2015 14:44:26 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p10si12685746wjo.3.2015.09.23.14.44.26 for (version=TLS1 cipher=RC4-SHA bits=128/128); Wed, 23 Sep 2015 14:44:26 -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]:50981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zerpx-0007O2-Sy for patch@linaro.org; Wed, 23 Sep 2015 17:44:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeros-0006Gf-Vv for qemu-devel@nongnu.org; Wed, 23 Sep 2015 17:43:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zeros-0006pi-38 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 17:43:18 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeror-0006nH-Ty for qemu-devel@nongnu.org; Wed, 23 Sep 2015 17:43:18 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Zeroj-00030u-U7 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 22:43:09 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 23 Sep 2015 22:43:08 +0100 Message-Id: <1443044589-11529-7-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1443044589-11529-1-git-send-email-peter.maydell@linaro.org> References: <1443044589-11529-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 6/7] hw/arm/virt-acpi-build: Fix wrong size of flash in ACPI table 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: peter.maydell@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.43 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, the ACPI table generation code was wrongly using this total size as the size of each flash device, so it would overlap other MMIO spaces. Make each device entry in the table half the total; this brings the ACPI table into line with the code which generates the device tree and which creates the flash devices themselves. Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones Reviewed-by: Wei Huang Tested-by: Graeme Gregory Message-id: 1442455041-6596-1-git-send-email-shannon.zhao@linaro.org [PMM: edited commit message] Signed-off-by: Peter Maydell --- 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 59c84ff..1aaff1f 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")));