[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V11 5/8] hw/arm/virt: add pvpanic device in virt acp
From: |
Peng Hao |
Subject: |
[Qemu-devel] [PATCH V11 5/8] hw/arm/virt: add pvpanic device in virt acpi table |
Date: |
Tue, 4 Dec 2018 03:26:46 +0800 |
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 <address@hidden>
Signed-off-by: Peng Hao <address@hidden>
---
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..4215ca6 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
- [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 5/8] hw/arm/virt: add pvpanic device in virt acpi table,
Peng Hao <=
- [Qemu-devel] [PATCH V11 6/8] hw/arm/virt: add configure interface for pvpanic-mmio, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 4/8] hw/arm/virt: Use the pvpanic device, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 8/8] pvpanic : update pvpanic document, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 3/8] hw/misc/pvpanic: Add the MMIO interface, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 1/8] hw/misc/pvpanic: Build the pvpanic device in $(common-obj), Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 7/8] hw/arm/virt: use the configure interface, Peng Hao, 2018/12/03
- [Qemu-devel] [PATCH V11 2/8] hw/misc/pvpanic: Cosmetic renaming, Peng Hao, 2018/12/03