From 68f799944b72387c0ef9535612a212a5ea492059 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Tue, 13 Jul 2010 13:01:42 +0900 Subject: pci_bridge: introduce pci bridge library. introduce pci bridge library. convert apb bridge and dec p2p bridge to use new pci bridge library. save/restore is supported as a side effect. This is also preparation for pci express root/upstream/downstream port. Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- hw/pci_internals.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'hw/pci_internals.h') diff --git a/hw/pci_internals.h b/hw/pci_internals.h index fa844abee1..e3c93a3cc5 100644 --- a/hw/pci_internals.h +++ b/hw/pci_internals.h @@ -5,6 +5,11 @@ * This header files is private to pci.c and pci_bridge.c * So following structures are opaque to others and shouldn't be * accessed. + * + * For pci-to-pci bridge needs to include this header file to embed + * PCIBridge in its structure or to get sizeof(PCIBridge), + * However, they shouldn't access those following members directly. + * Use accessor function in pci.h, pci_bridge.h */ extern struct BusInfo pci_bus_info; @@ -30,11 +35,13 @@ struct PCIBus { int *irq_count; }; -typedef struct { +struct PCIBridge { PCIDevice dev; + + /* private member */ PCIBus sec_bus; - uint32_t vid; - uint32_t did; -} PCIBridge; + pci_map_irq_fn map_irq; + const char *bus_name; +}; #endif /* QEMU_PCI_INTERNALS_H */ -- cgit v1.2.3