mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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
This commit is contained in:
parent
52f5903a27
commit
5b85eabe68
3 changed files with 191 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue