From 5b85eabe68f9e75d85e0c0db3b9eade75e7217f0 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 28 Sep 2020 12:42:46 +0200 Subject: 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 Reviewed-by: Michael S. Tsirkin Message-id: 20200928104256.9241-3-kraxel@redhat.com --- include/hw/pci-host/gpex.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/hw/pci-host/gpex.h') diff --git a/include/hw/pci-host/gpex.h b/include/hw/pci-host/gpex.h index 7abdb8b..d52ea80 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 */ -- cgit v1.1