diff options
Diffstat (limited to 'tests/libqos/pci-spapr.h')
-rw-r--r-- | tests/libqos/pci-spapr.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/libqos/pci-spapr.h b/tests/libqos/pci-spapr.h index 177e8c002c..d9e25631c6 100644 --- a/tests/libqos/pci-spapr.h +++ b/tests/libqos/pci-spapr.h @@ -10,7 +10,31 @@ #include "libqos/malloc.h" #include "libqos/pci.h" +#include "libqos/qgraph.h" +/* From include/hw/pci-host/spapr.h */ + +typedef struct QPCIWindow { + uint64_t pci_base; /* window address in PCI space */ + uint64_t size; /* window size */ +} QPCIWindow; + +typedef struct QPCIBusSPAPR { + QOSGraphObject obj; + QPCIBus bus; + QGuestAllocator *alloc; + + uint64_t buid; + + uint64_t pio_cpu_base; + QPCIWindow pio; + + uint64_t mmio32_cpu_base; + QPCIWindow mmio32; +} QPCIBusSPAPR; + +void qpci_init_spapr(QPCIBusSPAPR *ret, QTestState *qts, + QGuestAllocator *alloc); QPCIBus *qpci_new_spapr(QTestState *qts, QGuestAllocator *alloc); void qpci_free_spapr(QPCIBus *bus); |