mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/pcie: Introduce a base class for PCI Express Root Ports
The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
04eb6247eb
commit
9d5154d753
6 changed files with 194 additions and 0 deletions
|
@ -57,4 +57,23 @@ PCIESlot *pcie_chassis_find_slot(uint8_t chassis, uint16_t slot);
|
|||
int pcie_chassis_add_slot(struct PCIESlot *slot);
|
||||
void pcie_chassis_del_slot(PCIESlot *s);
|
||||
|
||||
#define TYPE_PCIE_ROOT_PORT "pcie-root-port-base"
|
||||
#define PCIE_ROOT_PORT_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(PCIERootPortClass, (klass), TYPE_PCIE_ROOT_PORT)
|
||||
#define PCIE_ROOT_PORT_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(PCIERootPortClass, (obj), TYPE_PCIE_ROOT_PORT)
|
||||
|
||||
typedef struct PCIERootPortClass {
|
||||
PCIDeviceClass parent_class;
|
||||
|
||||
uint8_t (*aer_vector)(const PCIDevice *dev);
|
||||
int (*interrupts_init)(PCIDevice *dev, Error **errp);
|
||||
void (*interrupts_uninit)(PCIDevice *dev);
|
||||
|
||||
int exp_offset;
|
||||
int aer_offset;
|
||||
int ssvid_offset;
|
||||
int ssid;
|
||||
} PCIERootPortClass;
|
||||
|
||||
#endif /* QEMU_PCIE_PORT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue