Revision 6e355d90 hw/pci.h

b/hw/pci.h
71 71
#define PCI_DEVICE_ID_VIRTIO_BALLOON     0x1002
72 72
#define PCI_DEVICE_ID_VIRTIO_CONSOLE     0x1003
73 73

  
74
typedef uint32_t pcibus_t;
75

  
74 76
typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
75 77
                                uint32_t address, uint32_t data, int len);
76 78
typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev,
77 79
                                   uint32_t address, int len);
78 80
typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num,
79
                                uint32_t addr, uint32_t size, int type);
81
                                pcibus_t addr, pcibus_t size, int type);
80 82
typedef int PCIUnregisterFunc(PCIDevice *pci_dev);
81 83

  
82 84
typedef struct PCIIORegion {
83
    uint32_t addr; /* current PCI mapping address. -1 means not mapped */
84
#define PCI_BAR_UNMAPPED (~(uint32_t)0)
85
    uint32_t size;
85
    pcibus_t addr; /* current PCI mapping address. -1 means not mapped */
86
#define PCI_BAR_UNMAPPED (~(pcibus_t)0)
87
    pcibus_t size;
86 88
    uint8_t type;
87 89
    PCIMapIORegionFunc *map_func;
88 90
} PCIIORegion;
......
224 226
                               PCIConfigWriteFunc *config_write);
225 227

  
226 228
void pci_register_bar(PCIDevice *pci_dev, int region_num,
227
                            uint32_t size, int type,
229
                            pcibus_t size, int type,
228 230
                            PCIMapIORegionFunc *map_func);
229 231

  
230 232
int pci_add_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);

Also available in: Unified diff