From patchwork Fri Jan 13 17:32: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: 91478 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp300105qgi; Fri, 13 Jan 2017 09:35:17 -0800 (PST) X-Received: by 10.55.16.219 with SMTP id 88mr18216061qkq.29.1484328917880; Fri, 13 Jan 2017 09:35:17 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 6si8852399qtw.311.2017.01.13.09.35.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jan 2017 09:35:17 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS5kz-0000W7-FI for patch@linaro.org; Fri, 13 Jan 2017 12:35:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS5iI-0006qq-Sf for qemu-devel@nongnu.org; Fri, 13 Jan 2017 12:32:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cS5iF-000510-O0 for qemu-devel@nongnu.org; Fri, 13 Jan 2017 12:32:30 -0500 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:38624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cS5iF-00050Z-IE for qemu-devel@nongnu.org; Fri, 13 Jan 2017 12:32:27 -0500 Received: by mail-wm0-x231.google.com with SMTP id r144so80796232wme.1 for ; Fri, 13 Jan 2017 09:32:27 -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=j6Jac2cxqgW1fS3NAE/gmyLSiOsgi4mGGtYfsleFCm8=; b=cIKN53AbixSx1i2u/2ZWk8OPFlkNBHv8p29YO3CrjMfbncuAAgH/lYCzBYyPwi3be0 sA/TNzvbOOMFNAATaMo7eQRR431/kJAgvjQESMoqRUfqN8WGNIRKBHe2kTDGPCL7I+s9 NIK2d5MDqC/zHvUXhhhM5PwU8KHg99sZbC74A= 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=j6Jac2cxqgW1fS3NAE/gmyLSiOsgi4mGGtYfsleFCm8=; b=rAiCV7c+iiDtcl5d7PQeaoJc6rBIbN9P0hbrO15txAo//VVL+l1E3gtLJJnc5yQgp0 TZD5hIx9wdOE7/9jZaDcCUKW+GPjYdhnCpx0U3TvkgXwYLqkLUIXRlKU9rgdjPCRPKep iMsjgUEpTRakTZ/JArjWMW0e/w6O+xffnBCqWXsvdPGTsy4o69uL+uRiTzMXB1MGoDVG gYFRYCaDJLKd4/fcCO2KXZcF8sB/Ue2ITOjimDUV8J/wsH99MqhQZjxtcfSC3sDMHu+P XACy5ZnpdSmcn7GKPG4EArtVDVwRvPcHXFQJgawe+uA5M/eyozDmV41gwZXvSl85eVBL cuZA== X-Gm-Message-State: AIkVDXLN/nw9LqwrRu+Z4dCGdYmgCOpM1QjyHQs9mPubl3xzJJNULQ+glndL9Xopr4fKGsQX X-Received: by 10.223.155.221 with SMTP id e29mr12579861wrc.107.1484328746009; Fri, 13 Jan 2017 09:32:26 -0800 (PST) Received: from localhost.localdomain ([160.167.203.25]) by smtp.gmail.com with ESMTPSA id z134sm5611620wmc.20.2017.01.13.09.32.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jan 2017 09:32:25 -0800 (PST) From: Ard Biesheuvel To: qemu-devel@nongnu.org Date: Fri, 13 Jan 2017 17:32:18 +0000 Message-Id: <1484328738-21149-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::231 Subject: [Qemu-devel] [PATCH v2] 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 085a61117378..50d52f685f68 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -310,6 +310,13 @@ 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"); + aml_append(dev_res0, aml_name_decl("_HID", aml_string("PNP0C02"))); + 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); }