diff options
author | Gerd Hoffmann | 2020-09-28 12:42:46 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2020-09-30 11:29:56 +0200 |
commit | 5b85eabe68f9e75d85e0c0db3b9eade75e7217f0 (patch) | |
tree | d80ec0c354ee63d69a2252447fb84ba0e8a5427f /include/hw | |
parent | move MemMapEntry (diff) | |
download | qemu-5b85eabe68f9e75d85e0c0db3b9eade75e7217f0.tar.gz qemu-5b85eabe68f9e75d85e0c0db3b9eade75e7217f0.tar.xz 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')
-rw-r--r-- | include/hw/pci-host/gpex.h | 11 |
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 */ |