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
;
26 MemoryRegion master_abort_mem
;
28 QLIST_HEAD(, PCIBus
) child
; /* this will be replaced by qdev later */
29 QLIST_ENTRY(PCIBus
) sibling
;/* this will be replaced by qdev later */
31 /* The bus IRQ state is the logical OR of the connected devices.
32 Keep a count of the number of devices with raised IRQs. */
37 typedef struct PCIBridgeWindows PCIBridgeWindows
;
40 * Aliases for each of the address space windows that the bridge
41 * can forward. Mapped into the bridge's parent's address space,
44 struct PCIBridgeWindows
{
45 MemoryRegion alias_pref_mem
;
46 MemoryRegion alias_mem
;
47 MemoryRegion alias_io
;
49 * When bridge control VGA forwarding is enabled, bridges will
50 * provide positive decode on the PCI VGA defined I/O port and
51 * MMIO ranges. When enabled forwarding is only qualified on the
52 * I/O and memory enable bits in the bridge command register.
54 MemoryRegion alias_vga
[QEMU_PCI_VGA_NUM_REGIONS
];
57 #define TYPE_PCI_BRIDGE "base-pci-bridge"
58 #define PCI_BRIDGE(obj) OBJECT_CHECK(PCIBridge, (obj), TYPE_PCI_BRIDGE)
68 * Memory regions for the bridge's address spaces. These regions are not
69 * directly added to system_memory/system_io or its descendants.
70 * Bridge's secondary bus points to these, so that devices
71 * under the bridge see these regions as its address spaces.
72 * The regions are as large as the entire address space -
73 * they don't take into account any windows.
75 MemoryRegion address_space_mem
;
76 MemoryRegion address_space_io
;
78 PCIBridgeWindows
*windows
;
80 pci_map_irq_fn map_irq
;
84 #endif /* QEMU_PCI_BUS_H */