]> Git Repo - qemu.git/blob - hw/pci_internals.h
pci: move out pci internal structures, PCIBus, PCIBridge, and pci_bus_info.
[qemu.git] / hw / pci_internals.h
1 #ifndef QEMU_PCI_INTERNALS_H
2 #define QEMU_PCI_INTERNALS_H
3
4 /*
5  * This header files is private to pci.c and pci_bridge.c
6  * So following structures are opaque to others and shouldn't be
7  * accessed.
8  */
9
10 extern struct BusInfo pci_bus_info;
11
12 struct PCIBus {
13     BusState qbus;
14     int devfn_min;
15     pci_set_irq_fn set_irq;
16     pci_map_irq_fn map_irq;
17     pci_hotplug_fn hotplug;
18     DeviceState *hotplug_qdev;
19     void *irq_opaque;
20     PCIDevice *devices[256];
21     PCIDevice *parent_dev;
22     target_phys_addr_t mem_base;
23
24     QLIST_HEAD(, PCIBus) child; /* this will be replaced by qdev later */
25     QLIST_ENTRY(PCIBus) sibling;/* this will be replaced by qdev later */
26
27     /* The bus IRQ state is the logical OR of the connected devices.
28        Keep a count of the number of devices with raised IRQs.  */
29     int nirq;
30     int *irq_count;
31 };
32
33 typedef struct {
34     PCIDevice dev;
35     PCIBus bus;
36     uint32_t vid;
37     uint32_t did;
38 } PCIBridge;
39
40 #endif /* QEMU_PCI_INTERNALS_H */
This page took 0.02192 seconds and 4 git commands to generate.