]> git.proxmox.com Git - mirror_qemu.git/blame - hw/pci_internals.h
pci/bridge: split out pci bridge code into pci_bridge.c from pci.c
[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.
8 */
9
10extern struct BusInfo pci_bus_info;
11
12struct 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
33typedef struct {
34 PCIDevice dev;
35 PCIBus bus;
36 uint32_t vid;
37 uint32_t did;
38} PCIBridge;
39
40#endif /* QEMU_PCI_INTERNALS_H */