From patchwork Fri Jan 13 16:36:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9515983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D97E860761 for ; Fri, 13 Jan 2017 16:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCF3F286DB for ; Fri, 13 Jan 2017 16:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C122C2875D; Fri, 13 Jan 2017 16:37:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00C51286DB for ; Fri, 13 Jan 2017 16:37:00 +0000 (UTC) Received: from localhost ([::1]:43339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS4qY-0004kB-LO for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 Jan 2017 11:36:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS4q9-0004j1-SX for qemu-devel@nongnu.org; Fri, 13 Jan 2017 11:36:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cS4q5-0006uW-18 for qemu-devel@nongnu.org; Fri, 13 Jan 2017 11:36:33 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cS4q4-0006uN-Qu for qemu-devel@nongnu.org; Fri, 13 Jan 2017 11:36:28 -0500 Received: by mail-wm0-x22a.google.com with SMTP id r144so78534129wme.1 for ; Fri, 13 Jan 2017 08:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=yZhhGZrsp/UjLfn7E8JVfGzXFNtexeZ+66a684Ujk6c=; b=V3K7t2ci1dTfHBXDUve+DyUaqFWfPmYmlm3bYTsFJ70W9nDg7DVhILm7igVCVSC6Sn IFVkAMTg/TQGuuhN+JkGWlLY9ov2SigkQVcqWZyWTsFm8Shf/05EFTFidebAGfKgn6DT E6kE4li85UP1O89xVQH8OtdFeMKPN/frKRIo0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yZhhGZrsp/UjLfn7E8JVfGzXFNtexeZ+66a684Ujk6c=; b=Gt8n+isYGTk8es5nd5i2CpPwAjct/6zKIu+Xc80brOyFiB/560Z22k+r0HQ34qqBQ0 SSWYBJOZfpQMHH+Orc8BHWVfNyNYx6BcYqbqzgYzL1xtzFZ6fbyqvLym3R08q3E340Lq UzzE6PW4yG5hanvRcklob0HMxFAj2mvQjELe1INgt05NtJJuzw9e3spMRCtOTdfU4FDR et3kNBSIe+Z16gbxMOodYj7774mD2Advz6PbTFRQq1KaD0IIIugdUDIccc71QK7ntONU N1GGTGpx4KsCQTWlACxw0JTDd0L2YavjXyAZ9O2JsB68DI44D5xgCHP/9gwsszxC4Fu9 4Vyg== X-Gm-Message-State: AIkVDXIrXX1vwFqSpLlXEWD8GUwBsp5gQXmQXh0NQffpRoL6MVRYlMVsctpRbY+BvaNxxdF8 X-Received: by 10.223.147.100 with SMTP id 91mr12656094wro.124.1484325387399; Fri, 13 Jan 2017 08:36:27 -0800 (PST) Received: from localhost.localdomain ([160.167.203.25]) by smtp.gmail.com with ESMTPSA id w18sm5335390wme.9.2017.01.13.08.36.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 08:36:26 -0800 (PST) From: Ard Biesheuvel To: qemu-devel@nongnu.org Date: Fri, 13 Jan 2017 16:36:18 +0000 Message-Id: <1484325378-28402-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22a Subject: [Qemu-devel] [PATCH] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, peter.maydell@linaro.org, al.stone@linaro.org, graeme.gregory@linaro.org, Ard Biesheuvel Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Linux for arm64 v4.10 and later will complain if the ECAM config space is not reserved in the ACPI namespace: acpi PNP0A08:00: [Firmware Bug]: ECAM area [mem 0x3f000000-0x3fffffff] not reserved in ACPI namespace The rationale is that OSes that don't consume the MCFG table should still be able to infer that the PCI config space MMIO region is occupied. So update the ACPI table generation routine to add this reservation. Signed-off-by: Ard Biesheuvel --- hw/arm/virt-acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 085a61117378..e8769dc6288f 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -310,6 +310,12 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, Aml *dev_rp0 = aml_device("%s", "RP0"); aml_append(dev_rp0, aml_name_decl("_ADR", aml_int(0))); aml_append(dev, dev_rp0); + + Aml *dev_res0 = aml_device("%s", "RES0"); + crs = aml_resource_template(); + aml_append(crs, aml_memory32_fixed(base_ecam, size_ecam, AML_READ_WRITE)); + aml_append(dev_res0, aml_name_decl("_CRS", crs)); + aml_append(dev, dev_res0); aml_append(scope, dev); }