5 * PCI Bus and Bridge datastructures.
7 * Do not access the following members directly;
8 * use accessor functions in pci.h, pci_bridge.h
13 PCIIOMMUFunc iommu_fn;
16 pci_set_irq_fn set_irq;
17 pci_map_irq_fn map_irq;
18 pci_route_irq_fn route_intx_to_irq;
19 pci_hotplug_fn hotplug;
20 DeviceState *hotplug_qdev;
22 PCIDevice *devices[PCI_SLOT_MAX * PCI_FUNC_MAX];
23 PCIDevice *parent_dev;
24 MemoryRegion *address_space_mem;
25 MemoryRegion *address_space_io;
27 QLIST_HEAD(, PCIBus) child; /* this will be replaced by qdev later */
28 QLIST_ENTRY(PCIBus) sibling;/* this will be replaced by qdev later */
30 /* The bus IRQ state is the logical OR of the connected devices.
31 Keep a count of the number of devices with raised IRQs. */
36 typedef struct PCIBridgeWindows PCIBridgeWindows;
39 * Aliases for each of the address space windows that the bridge
40 * can forward. Mapped into the bridge's parent's address space,
43 struct PCIBridgeWindows {
44 MemoryRegion alias_pref_mem;
45 MemoryRegion alias_mem;
46 MemoryRegion alias_io;
48 * When bridge control VGA forwarding is enabled, bridges will
49 * provide positive decode on the PCI VGA defined I/O port and
50 * MMIO ranges. When enabled forwarding is only qualified on the
51 * I/O and memory enable bits in the bridge command register.
53 MemoryRegion alias_vga[QEMU_PCI_VGA_NUM_REGIONS];
56 #define TYPE_PCI_BRIDGE "base-pci-bridge"
57 #define PCI_BRIDGE(obj) OBJECT_CHECK(PCIBridge, (obj), TYPE_PCI_BRIDGE)
67 * Memory regions for the bridge's address spaces. These regions are not
68 * directly added to system_memory/system_io or its descendants.
69 * Bridge's secondary bus points to these, so that devices
70 * under the bridge see these regions as its address spaces.
71 * The regions are as large as the entire address space -
72 * they don't take into account any windows.
74 MemoryRegion address_space_mem;
75 MemoryRegion address_space_io;
77 PCIBridgeWindows *windows;
79 pci_map_irq_fn map_irq;
83 #endif /* QEMU_PCI_BUS_H */