2016-09-29 13:32:44 +03:00
|
|
|
/*
|
|
|
|
* libqos PCI bindings for SPAPR
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LIBQOS_PCI_SPAPR_H
|
|
|
|
#define LIBQOS_PCI_SPAPR_H
|
|
|
|
|
2020-08-04 21:00:40 +03:00
|
|
|
#include "malloc.h"
|
|
|
|
#include "pci.h"
|
|
|
|
#include "qgraph.h"
|
2016-09-29 13:32:44 +03:00
|
|
|
|
2018-07-10 17:09:26 +03:00
|
|
|
/* 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);
|
2018-07-19 14:50:27 +03:00
|
|
|
QPCIBus *qpci_new_spapr(QTestState *qts, QGuestAllocator *alloc);
|
2016-09-29 13:32:44 +03:00
|
|
|
void qpci_free_spapr(QPCIBus *bus);
|
|
|
|
|
|
|
|
#endif
|