All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Hao <peng.hao2@zte.com.cn>
To: peter.maydell@linaro.org, drjones@redhat.com, philmd@redhat.com
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	Peng Hao <peng.hao2@zte.com.cn>
Subject: [Qemu-devel] [PATCH V10 5/9] hw/arm/virt: add pvpanic device in virt acpi table
Date: Wed, 28 Nov 2018 20:12:48 +0800	[thread overview]
Message-ID: <1543407172-16175-6-git-send-email-peng.hao2@zte.com.cn> (raw)
In-Reply-To: <1543407172-16175-1-git-send-email-peng.hao2@zte.com.cn>

Add pvpanic device in virt acpi table, so when kenrel command line
uses acpi=force, kernel can get info from acpi table.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 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 5785fb6..2adba60 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -84,6 +84,20 @@ static void acpi_dsdt_add_uart(Aml *scope, const MemMapEntry *uart_memmap,
     aml_append(scope, dev);
 }
 
+static void acpi_dsdt_add_pvpanic(Aml *scope, const MemMapEntry *pvpanic_memmap)
+{
+    Aml *dev = aml_device("PEVT");
+    aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0001")));
+    aml_append(dev, aml_name_decl("_UID", aml_int(0)));
+
+    Aml *crs = aml_resource_template();
+    aml_append(crs, aml_memory32_fixed(pvpanic_memmap->base,
+                                       pvpanic_memmap->size, AML_READ_WRITE));
+
+    aml_append(dev, aml_name_decl("_CRS", crs));
+    aml_append(scope, dev);
+}
+
 static void acpi_dsdt_add_fw_cfg(Aml *scope, const MemMapEntry *fw_cfg_memmap)
 {
     Aml *dev = aml_device("FWCF");
@@ -771,6 +785,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
     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_pvpanic(scope, &memmap[VIRT_PVPANIC]);
     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_TRANSPORTS);
-- 
1.8.3.1

  parent reply	other threads:[~2018-11-28  3:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 12:12 [Qemu-devel] [PATCH V10 0/9] add pvpanic mmio support Peng Hao
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 1/9] hw/misc/pvpanic: Build the pvpanic device in $(common-obj) Peng Hao
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 2/9] hw/misc/pvpanic: Cosmetic renaming Peng Hao
2018-11-30 15:39   ` Peter Maydell
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 3/9] hw/misc/pvpanic: Add the MMIO interface Peng Hao
2018-11-30 15:41   ` Peter Maydell
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 4/9] hw/arm/virt: Use the pvpanic device Peng Hao
2018-11-30 15:48   ` Peter Maydell
2018-11-28 12:12 ` Peng Hao [this message]
2018-11-30 15:51   ` [Qemu-devel] [PATCH V10 5/9] hw/arm/virt: add pvpanic device in virt acpi table Peter Maydell
2018-11-30 16:06   ` Andrew Jones
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 6/9] hw/misc/pvpanic: add configure query interface Peng Hao
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 7/9] hw/misc/pvpanic: preparing for adding configure interface Peng Hao
2018-11-30 15:56   ` Peter Maydell
2018-11-30 15:57     ` Peter Maydell
2018-11-30 16:14       ` Andrew Jones
2018-11-30 16:21         ` Peter Maydell
2018-12-01  9:28           ` [Qemu-devel] [PATCH V10 7/9] hw/misc/pvpanic: preparing foradding " peng.hao2
2018-12-01 12:05             ` Peter Maydell
2018-12-01  9:11     ` [Qemu-devel] [PATCH V10 7/9] hw/misc/pvpanic: preparing for adding " peng.hao2
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 8/9] hw/misc/pvpanic: realize the " Peng Hao
2018-11-30 15:53   ` Peter Maydell
2018-11-28 12:12 ` [Qemu-devel] [PATCH V10 9/9] pvpanic : update pvpanic document Peng Hao
2018-11-30 16:00   ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543407172-16175-6-git-send-email-peng.hao2@zte.com.cn \
    --to=peng.hao2@zte.com.cn \
    --cc=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.