All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mihai Carabas <mihai.carabas@oracle.com>
To: peter.maydell@linaro.org, shannon.zhaosl@gmail.com,
	mst@redhat.com, imammedo@redhat.com
Cc: Mihai Carabas <mihai.carabas@oracle.com>,
	Peng Hao <peng.hao2@zte.com.cn>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 5/8] hw/arm/virt: add pvpanic device in virt acpi table
Date: Thu, 22 Oct 2020 10:42:53 +0300	[thread overview]
Message-ID: <1603352576-21671-6-git-send-email-mihai.carabas@oracle.com> (raw)
In-Reply-To: <1603352576-21671-1-git-send-email-mihai.carabas@oracle.com>

From: Peng Hao <peng.hao2@zte.com.cn>

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

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
---
 hw/arm/virt-acpi-build.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 9747a64..f64bf89 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -87,6 +87,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");
@@ -605,6 +619,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
     if (vmc->acpi_expose_flash) {
         acpi_dsdt_add_flash(scope, &memmap[VIRT_FLASH]);
     }
+    if (vms->pvpanic) {
+        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:[~2020-10-22  8:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  7:42 [PATCH 0/8] Add support for pvpanic mmio device Mihai Carabas
2020-10-22  7:42 ` [PATCH 1/8] hw/misc/pvpanic: Build the pvpanic device for any machine Mihai Carabas
2020-10-22  7:42 ` [PATCH 2/8] hw/misc/pvpanic: Cosmetic renaming Mihai Carabas
2020-10-22  7:42 ` [PATCH 3/8] hw/misc/pvpanic: Add the MMIO interface Mihai Carabas
2020-10-22  7:42 ` [PATCH 4/8] hw/arm/virt: Use the pvpanic device Mihai Carabas
2020-10-22  7:42 ` Mihai Carabas [this message]
2020-10-22  7:42 ` [PATCH 6/8] hw/arm/virt: add configure interface for pvpanic-mmio Mihai Carabas
2020-10-22  7:42 ` [PATCH 7/8] pvpanic : update pvpanic document Mihai Carabas
2020-10-22  7:42 ` [PATCH 8/8] pvpanic: break dependency on ISA_BUS Mihai Carabas
2020-10-22 10:17 ` [PATCH 0/8] Add support for pvpanic mmio device Peter Maydell
2020-10-26 13:50   ` Mihai Carabas
2020-10-26 14:32     ` Peter Maydell

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=1603352576-21671-6-git-send-email-mihai.carabas@oracle.com \
    --to=mihai.carabas@oracle.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peng.hao2@zte.com.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    /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.