Revision cfb0a50a hw/pci.c
b/hw/pci.c | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
#include "hw.h" |
25 | 25 |
#include "pci.h" |
26 |
#include "pci_internals.h" |
|
26 | 27 |
#include "monitor.h" |
27 | 28 |
#include "net.h" |
28 | 29 |
#include "sysemu.h" |
... | ... | |
36 | 37 |
# define PCI_DPRINTF(format, ...) do { } while (0) |
37 | 38 |
#endif |
38 | 39 |
|
39 |
struct PCIBus { |
|
40 |
BusState qbus; |
|
41 |
int devfn_min; |
|
42 |
pci_set_irq_fn set_irq; |
|
43 |
pci_map_irq_fn map_irq; |
|
44 |
pci_hotplug_fn hotplug; |
|
45 |
DeviceState *hotplug_qdev; |
|
46 |
void *irq_opaque; |
|
47 |
PCIDevice *devices[256]; |
|
48 |
PCIDevice *parent_dev; |
|
49 |
target_phys_addr_t mem_base; |
|
50 |
|
|
51 |
QLIST_HEAD(, PCIBus) child; /* this will be replaced by qdev later */ |
|
52 |
QLIST_ENTRY(PCIBus) sibling;/* this will be replaced by qdev later */ |
|
53 |
|
|
54 |
/* The bus IRQ state is the logical OR of the connected devices. |
|
55 |
Keep a count of the number of devices with raised IRQs. */ |
|
56 |
int nirq; |
|
57 |
int *irq_count; |
|
58 |
}; |
|
59 |
|
|
60 | 40 |
static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent); |
61 | 41 |
static char *pcibus_get_dev_path(DeviceState *dev); |
62 | 42 |
|
63 |
static struct BusInfo pci_bus_info = {
|
|
43 |
struct BusInfo pci_bus_info = { |
|
64 | 44 |
.name = "PCI", |
65 | 45 |
.size = sizeof(PCIBus), |
66 | 46 |
.print_dev = pcibus_dev_print, |
... | ... | |
1533 | 1513 |
return res; |
1534 | 1514 |
} |
1535 | 1515 |
|
1536 |
typedef struct { |
|
1537 |
PCIDevice dev; |
|
1538 |
PCIBus bus; |
|
1539 |
uint32_t vid; |
|
1540 |
uint32_t did; |
|
1541 |
} PCIBridge; |
|
1542 |
|
|
1543 |
|
|
1544 | 1516 |
static void pci_bridge_update_mappings_fn(PCIBus *b, PCIDevice *d) |
1545 | 1517 |
{ |
1546 | 1518 |
pci_update_mappings(d); |
Also available in: Unified diff