From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.25.159.19 with SMTP id i19csp2704040lfe; Wed, 10 Feb 2016 12:44:21 -0800 (PST) X-Received: by 10.140.85.19 with SMTP id m19mr42151167qgd.106.1455137060792; Wed, 10 Feb 2016 12:44:20 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 188si5460734qhj.38.2016.02.10.12.44.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 10 Feb 2016 12:44:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=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; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Received: from localhost ([::1]:42964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTbca-00034t-Cd for alex.bennee@linaro.org; Wed, 10 Feb 2016 15:44:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTbaB-0007AV-3p for qemu-devel@nongnu.org; Wed, 10 Feb 2016 15:41:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTbaA-0008ON-2l for qemu-devel@nongnu.org; Wed, 10 Feb 2016 15:41:51 -0500 Received: from relay-05.andrew.cmu.edu ([128.2.157.12]:39559 helo=relay.andrew.cmu.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTba5-0008Kv-PO; Wed, 10 Feb 2016 15:41:45 -0500 Received: from HEDWIG.ini.cmu.edu (HEDWIG.INI.CMU.EDU [128.2.16.51]) by relay.andrew.cmu.edu (8.14.7/8.14.7) with ESMTP id u1AKfeYE004670; Wed, 10 Feb 2016 15:41:40 -0500 From: "Gabriel L. Somlo" To: qemu-devel@nongnu.org Date: Wed, 10 Feb 2016 15:41:39 -0500 Message-Id: <1455136900-22334-5-git-send-email-somlo@cmu.edu> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1455136900-22334-1-git-send-email-somlo@cmu.edu> References: <1455136900-22334-1-git-send-email-somlo@cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.74 on 128.2.157.12 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay.andrew.cmu.edu id u1AKfeYE004670 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 128.2.157.12 Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, matt@codeblueprint.co.uk, stefanha@gmail.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, luto@amacapital.net, qemu-arm@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com, imammedo@redhat.com, lersek@redhat.com, rth@twiddle.net Subject: [Qemu-devel] [PATCH v7 4/5] acpi: arm: add fw_cfg device node to dsdt 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+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: atosciCSBUgU Add a fw_cfg device node to the ACPI DSDT. This is mostly informational, as the authoritative fw_cfg MMIO region(s) are listed in the Device Tree. However, since we are building ACPI tables, we might as well be thorough while at it... Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested-by: Laszlo Ersek Reviewed-by: Marc Mar=C3=AD --- hw/arm/virt-acpi-build.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 8cf9a21..7d7998b 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -81,6 +81,20 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMa= pEntry *uart_memmap, aml_append(scope, dev); } =20 +static void acpi_dsdt_add_fw_cfg(Aml *scope, const MemMapEntry *fw_cfg_m= emmap) +{ + Aml *dev =3D aml_device("FWCF"); + aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002"))); + /* device present, functioning, decoding, not shown in UI */ + aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); + + Aml *crs =3D aml_resource_template(); + aml_append(crs, aml_memory32_fixed(fw_cfg_memmap->base, + fw_cfg_memmap->size, AML_READ_WRI= TE)); + aml_append(dev, aml_name_decl("_CRS", crs)); + aml_append(scope, dev); +} + static void acpi_dsdt_add_flash(Aml *scope, const MemMapEntry *flash_mem= map) { Aml *dev, *crs; @@ -548,6 +562,7 @@ build_dsdt(GArray *table_data, GArray *linker, VirtGu= estInfo *guest_info) acpi_dsdt_add_uart(scope, &memmap[VIRT_UART], (irqmap[VIRT_UART] + ARM_SPI_BASE)); acpi_dsdt_add_flash(scope, &memmap[VIRT_FLASH]); + acpi_dsdt_add_fw_cfg(scope, &memmap[VIRT_FW_CFG]); acpi_dsdt_add_virtio(scope, &memmap[VIRT_MMIO], (irqmap[VIRT_MMIO] + ARM_SPI_BASE), NUM_VIRTIO_TRANS= PORTS); acpi_dsdt_add_pci(scope, memmap, (irqmap[VIRT_PCIE] + ARM_SPI_BASE), --=20 2.4.3