]> git.proxmox.com Git - mirror_qemu.git/blame - hw/pci_internals.h
Sort the help info shown in monitor at runtime
[mirror_qemu.git] / hw / pci_internals.h
CommitLineData
cfb0a50a
IY
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.
68f79994
IY
8 *
9 * For pci-to-pci bridge needs to include this header file to embed
10 * PCIBridge in its structure or to get sizeof(PCIBridge),
11 * However, they shouldn't access those following members directly.
12 * Use accessor function in pci.h, pci_bridge.h
cfb0a50a
IY
13 */
14
15extern struct BusInfo pci_bus_info;
16
17struct PCIBus {
18 BusState qbus;
6f3279b5 19 uint8_t devfn_min;
cfb0a50a
IY
20 pci_set_irq_fn set_irq;
21 pci_map_irq_fn map_irq;
22 pci_hotplug_fn hotplug;
23 DeviceState *hotplug_qdev;
24 void *irq_opaque;
90a20dbb 25 PCIDevice *devices[PCI_SLOT_MAX * PCI_FUNC_MAX];
cfb0a50a 26 PCIDevice *parent_dev;
5968eca3
AK
27 MemoryRegion *address_space_mem;
28 MemoryRegion *address_space_io;
cfb0a50a
IY
29
30 QLIST_HEAD(, PCIBus) child; /* this will be replaced by qdev later */
31 QLIST_ENTRY(PCIBus) sibling;/* this will be replaced by qdev later */
32
33 /* The bus IRQ state is the logical OR of the connected devices.
34 Keep a count of the number of devices with raised IRQs. */
35 int nirq;
36 int *irq_count;
37};
38
68f79994 39struct PCIBridge {
cfb0a50a 40 PCIDevice dev;
68f79994
IY
41
42 /* private member */
7e98e3af 43 PCIBus sec_bus;
336411ca
MT
44 /*
45 * Memory regions for the bridge's address spaces. These regions are not
46 * directly added to system_memory/system_io or its descendants.
47 * Bridge's secondary bus points to these, so that devices
48 * under the bridge see these regions as its address spaces.
49 * The regions are as large as the entire address space -
50 * they don't take into account any windows.
51 */
52 MemoryRegion address_space_mem;
53 MemoryRegion address_space_io;
54 /*
55 * Aliases for each of the address space windows that the bridge
56 * can forward. Mapped into the bridge's parent's address space,
57 * as subregions.
58 */
7df32ca0
MT
59 MemoryRegion alias_pref_mem;
60 MemoryRegion alias_mem;
61 MemoryRegion alias_io;
68f79994
IY
62 pci_map_irq_fn map_irq;
63 const char *bus_name;
64};
cfb0a50a
IY
65
66#endif /* QEMU_PCI_INTERNALS_H */