summary refs log tree commit diff stats
path: root/include/hw/pci-host/gpex.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-09-28 12:42:46 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-09-30 11:29:56 +0200
commit5b85eabe68f9e75d85e0c0db3b9eade75e7217f0 (patch)
treed80ec0c354ee63d69a2252447fb84ba0e8a5427f /include/hw/pci-host/gpex.h
parent52f5903a27f3bf862aced027dfce4444eed4e2fe (diff)
downloadfocaccia-qemu-5b85eabe68f9e75d85e0c0db3b9eade75e7217f0.tar.gz
focaccia-qemu-5b85eabe68f9e75d85e0c0db3b9eade75e7217f0.zip
acpi: add acpi_dsdt_add_gpex
Add helper function to generate dsdt aml code for the gpex pci host.
Largely copied from arm/virt.  Configuration is handled by passing
a config struct instead of looked up from memory map.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20200928104256.9241-3-kraxel@redhat.com
Diffstat (limited to 'include/hw/pci-host/gpex.h')
-rw-r--r--include/hw/pci-host/gpex.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/pci-host/gpex.h b/include/hw/pci-host/gpex.h
index 7abdb8b406..d52ea80d4e 100644
--- a/include/hw/pci-host/gpex.h
+++ b/include/hw/pci-host/gpex.h
@@ -20,6 +20,7 @@
 #ifndef HW_GPEX_H
 #define HW_GPEX_H
 
+#include "exec/hwaddr.h"
 #include "hw/sysbus.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pcie_host.h"
@@ -52,6 +53,16 @@ struct GPEXHost {
     int irq_num[GPEX_NUM_IRQS];
 };
 
+struct GPEXConfig {
+    MemMapEntry ecam;
+    MemMapEntry mmio32;
+    MemMapEntry mmio64;
+    MemMapEntry pio;
+    int         irq;
+};
+
 int gpex_set_irq_num(GPEXHost *s, int index, int gsi);
 
+void acpi_dsdt_add_gpex(Aml *scope, struct GPEXConfig *cfg);
+
 #endif /* HW_GPEX_H */