Revision 6e355d90
b/hw/ac97.c | ||
---|---|---|
1250 | 1250 |
} |
1251 | 1251 |
|
1252 | 1252 |
static void ac97_map (PCIDevice *pci_dev, int region_num, |
1253 |
uint32_t addr, uint32_t size, int type)
|
|
1253 |
pcibus_t addr, pcibus_t size, int type)
|
|
1254 | 1254 |
{ |
1255 | 1255 |
AC97LinkState *s = DO_UPCAST (AC97LinkState, dev, pci_dev); |
1256 | 1256 |
PCIDevice *d = &s->dev; |
b/hw/cirrus_vga.c | ||
---|---|---|
3174 | 3174 |
***************************************/ |
3175 | 3175 |
|
3176 | 3176 |
static void cirrus_pci_lfb_map(PCIDevice *d, int region_num, |
3177 |
uint32_t addr, uint32_t size, int type)
|
|
3177 |
pcibus_t addr, pcibus_t size, int type)
|
|
3178 | 3178 |
{ |
3179 | 3179 |
CirrusVGAState *s = &DO_UPCAST(PCICirrusVGAState, dev, d)->cirrus_vga; |
3180 | 3180 |
|
... | ... | |
3195 | 3195 |
} |
3196 | 3196 |
|
3197 | 3197 |
static void cirrus_pci_mmio_map(PCIDevice *d, int region_num, |
3198 |
uint32_t addr, uint32_t size, int type)
|
|
3198 |
pcibus_t addr, pcibus_t size, int type)
|
|
3199 | 3199 |
{ |
3200 | 3200 |
CirrusVGAState *s = &DO_UPCAST(PCICirrusVGAState, dev, d)->cirrus_vga; |
3201 | 3201 |
|
b/hw/e1000.c | ||
---|---|---|
145 | 145 |
}; |
146 | 146 |
|
147 | 147 |
static void |
148 |
ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr,
|
|
149 |
uint32_t size, int type)
|
|
148 |
ioport_map(PCIDevice *pci_dev, int region_num, pcibus_t addr,
|
|
149 |
pcibus_t size, int type)
|
|
150 | 150 |
{ |
151 | 151 |
DBGOUT(IO, "e1000_ioport_map addr=0x%04x size=0x%08x\n", addr, size); |
152 | 152 |
} |
... | ... | |
1011 | 1011 |
|
1012 | 1012 |
static void |
1013 | 1013 |
e1000_mmio_map(PCIDevice *pci_dev, int region_num, |
1014 |
uint32_t addr, uint32_t size, int type)
|
|
1014 |
pcibus_t addr, pcibus_t size, int type)
|
|
1015 | 1015 |
{ |
1016 | 1016 |
E1000State *d = DO_UPCAST(E1000State, dev, pci_dev); |
1017 | 1017 |
int i; |
b/hw/eepro100.c | ||
---|---|---|
1384 | 1384 |
/* PCI EEPRO100 definitions */ |
1385 | 1385 |
|
1386 | 1386 |
static void pci_map(PCIDevice * pci_dev, int region_num, |
1387 |
uint32_t addr, uint32_t size, int type)
|
|
1387 |
pcibus_t addr, pcibus_t size, int type)
|
|
1388 | 1388 |
{ |
1389 | 1389 |
EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev); |
1390 | 1390 |
|
... | ... | |
1463 | 1463 |
}; |
1464 | 1464 |
|
1465 | 1465 |
static void pci_mmio_map(PCIDevice * pci_dev, int region_num, |
1466 |
uint32_t addr, uint32_t size, int type)
|
|
1466 |
pcibus_t addr, pcibus_t size, int type)
|
|
1467 | 1467 |
{ |
1468 | 1468 |
EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev); |
1469 | 1469 |
|
b/hw/es1370.c | ||
---|---|---|
907 | 907 |
} |
908 | 908 |
|
909 | 909 |
static void es1370_map (PCIDevice *pci_dev, int region_num, |
910 |
uint32_t addr, uint32_t size, int type)
|
|
910 |
pcibus_t addr, pcibus_t size, int type)
|
|
911 | 911 |
{ |
912 | 912 |
ES1370State *s = DO_UPCAST (ES1370State, dev, pci_dev); |
913 | 913 |
|
b/hw/ide/cmd646.c | ||
---|---|---|
45 | 45 |
static void cmd646_update_irq(PCIIDEState *d); |
46 | 46 |
|
47 | 47 |
static void ide_map(PCIDevice *pci_dev, int region_num, |
48 |
uint32_t addr, uint32_t size, int type)
|
|
48 |
pcibus_t addr, pcibus_t size, int type)
|
|
49 | 49 |
{ |
50 | 50 |
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev); |
51 | 51 |
IDEBus *bus; |
... | ... | |
136 | 136 |
} |
137 | 137 |
|
138 | 138 |
static void bmdma_map(PCIDevice *pci_dev, int region_num, |
139 |
uint32_t addr, uint32_t size, int type)
|
|
139 |
pcibus_t addr, pcibus_t size, int type)
|
|
140 | 140 |
{ |
141 | 141 |
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev); |
142 | 142 |
int i; |
b/hw/ide/piix.c | ||
---|---|---|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
static void bmdma_map(PCIDevice *pci_dev, int region_num, |
72 |
uint32_t addr, uint32_t size, int type)
|
|
72 |
pcibus_t addr, pcibus_t size, int type)
|
|
73 | 73 |
{ |
74 | 74 |
PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev); |
75 | 75 |
int i; |
b/hw/lsi53c895a.c | ||
---|---|---|
1925 | 1925 |
} |
1926 | 1926 |
|
1927 | 1927 |
static void lsi_io_mapfunc(PCIDevice *pci_dev, int region_num, |
1928 |
uint32_t addr, uint32_t size, int type)
|
|
1928 |
pcibus_t addr, pcibus_t size, int type)
|
|
1929 | 1929 |
{ |
1930 | 1930 |
LSIState *s = DO_UPCAST(LSIState, dev, pci_dev); |
1931 | 1931 |
|
... | ... | |
1940 | 1940 |
} |
1941 | 1941 |
|
1942 | 1942 |
static void lsi_ram_mapfunc(PCIDevice *pci_dev, int region_num, |
1943 |
uint32_t addr, uint32_t size, int type)
|
|
1943 |
pcibus_t addr, pcibus_t size, int type)
|
|
1944 | 1944 |
{ |
1945 | 1945 |
LSIState *s = DO_UPCAST(LSIState, dev, pci_dev); |
1946 | 1946 |
|
... | ... | |
1950 | 1950 |
} |
1951 | 1951 |
|
1952 | 1952 |
static void lsi_mmio_mapfunc(PCIDevice *pci_dev, int region_num, |
1953 |
uint32_t addr, uint32_t size, int type)
|
|
1953 |
pcibus_t addr, pcibus_t size, int type)
|
|
1954 | 1954 |
{ |
1955 | 1955 |
LSIState *s = DO_UPCAST(LSIState, dev, pci_dev); |
1956 | 1956 |
|
b/hw/macio.c | ||
---|---|---|
40 | 40 |
}; |
41 | 41 |
|
42 | 42 |
static void macio_map (PCIDevice *pci_dev, int region_num, |
43 |
uint32_t addr, uint32_t size, int type)
|
|
43 |
pcibus_t addr, pcibus_t size, int type)
|
|
44 | 44 |
{ |
45 | 45 |
macio_state_t *macio_state; |
46 | 46 |
int i; |
b/hw/msix.c | ||
---|---|---|
200 | 200 |
|
201 | 201 |
/* Should be called from device's map method. */ |
202 | 202 |
void msix_mmio_map(PCIDevice *d, int region_num, |
203 |
uint32_t addr, uint32_t size, int type)
|
|
203 |
pcibus_t addr, pcibus_t size, int type)
|
|
204 | 204 |
{ |
205 | 205 |
uint8_t *config = d->config + d->msix_cap; |
206 | 206 |
uint32_t table = pci_get_long(config + MSIX_TABLE_OFFSET); |
b/hw/msix.h | ||
---|---|---|
2 | 2 |
#define QEMU_MSIX_H |
3 | 3 |
|
4 | 4 |
#include "qemu-common.h" |
5 |
#include "pci.h" |
|
5 | 6 |
|
6 | 7 |
int msix_init(PCIDevice *pdev, unsigned short nentries, |
7 | 8 |
unsigned bar_nr, unsigned bar_size); |
... | ... | |
10 | 11 |
uint32_t val, int len); |
11 | 12 |
|
12 | 13 |
void msix_mmio_map(PCIDevice *pci_dev, int region_num, |
13 |
uint32_t addr, uint32_t size, int type);
|
|
14 |
pcibus_t addr, pcibus_t size, int type);
|
|
14 | 15 |
|
15 | 16 |
int msix_uninit(PCIDevice *d); |
16 | 17 |
|
b/hw/ne2000.c | ||
---|---|---|
679 | 679 |
/* PCI NE2000 definitions */ |
680 | 680 |
|
681 | 681 |
static void ne2000_map(PCIDevice *pci_dev, int region_num, |
682 |
uint32_t addr, uint32_t size, int type)
|
|
682 |
pcibus_t addr, pcibus_t size, int type)
|
|
683 | 683 |
{ |
684 | 684 |
PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev); |
685 | 685 |
NE2000State *s = &d->ne2000; |
b/hw/openpic.c | ||
---|---|---|
1026 | 1026 |
}; |
1027 | 1027 |
|
1028 | 1028 |
static void openpic_map(PCIDevice *pci_dev, int region_num, |
1029 |
uint32_t addr, uint32_t size, int type)
|
|
1029 |
pcibus_t addr, pcibus_t size, int type)
|
|
1030 | 1030 |
{ |
1031 | 1031 |
openpic_t *opp; |
1032 | 1032 |
|
b/hw/pci.c | ||
---|---|---|
455 | 455 |
} |
456 | 456 |
|
457 | 457 |
void pci_register_bar(PCIDevice *pci_dev, int region_num, |
458 |
uint32_t size, int type,
|
|
458 |
pcibus_t size, int type,
|
|
459 | 459 |
PCIMapIORegionFunc *map_func) |
460 | 460 |
{ |
461 | 461 |
PCIIORegion *r; |
462 | 462 |
uint32_t addr; |
463 |
uint32_t wmask;
|
|
463 |
pcibus_t wmask;
|
|
464 | 464 |
|
465 | 465 |
if ((unsigned int)region_num >= PCI_NUM_REGIONS) |
466 | 466 |
return; |
... | ... | |
492 | 492 |
{ |
493 | 493 |
PCIIORegion *r; |
494 | 494 |
int cmd, i; |
495 |
uint32_t last_addr, new_addr;
|
|
495 |
pcibus_t last_addr, new_addr;
|
|
496 | 496 |
|
497 | 497 |
cmd = pci_get_word(d->config + PCI_COMMAND); |
498 | 498 |
for(i = 0; i < PCI_NUM_REGIONS; i++) { |
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); |
b/hw/pcnet.c | ||
---|---|---|
1727 | 1727 |
} |
1728 | 1728 |
|
1729 | 1729 |
static void pcnet_ioport_map(PCIDevice *pci_dev, int region_num, |
1730 |
uint32_t addr, uint32_t size, int type)
|
|
1730 |
pcibus_t addr, pcibus_t size, int type)
|
|
1731 | 1731 |
{ |
1732 | 1732 |
PCNetState *d = &DO_UPCAST(PCIPCNetState, pci_dev, pci_dev)->state; |
1733 | 1733 |
|
... | ... | |
1920 | 1920 |
}; |
1921 | 1921 |
|
1922 | 1922 |
static void pcnet_mmio_map(PCIDevice *pci_dev, int region_num, |
1923 |
uint32_t addr, uint32_t size, int type)
|
|
1923 |
pcibus_t addr, pcibus_t size, int type)
|
|
1924 | 1924 |
{ |
1925 | 1925 |
PCIPCNetState *d = DO_UPCAST(PCIPCNetState, pci_dev, pci_dev); |
1926 | 1926 |
|
b/hw/rtl8139.c | ||
---|---|---|
3192 | 3192 |
/* PCI RTL8139 definitions */ |
3193 | 3193 |
|
3194 | 3194 |
static void rtl8139_mmio_map(PCIDevice *pci_dev, int region_num, |
3195 |
uint32_t addr, uint32_t size, int type)
|
|
3195 |
pcibus_t addr, pcibus_t size, int type)
|
|
3196 | 3196 |
{ |
3197 | 3197 |
RTL8139State *s = DO_UPCAST(RTL8139State, dev, pci_dev); |
3198 | 3198 |
|
... | ... | |
3200 | 3200 |
} |
3201 | 3201 |
|
3202 | 3202 |
static void rtl8139_ioport_map(PCIDevice *pci_dev, int region_num, |
3203 |
uint32_t addr, uint32_t size, int type)
|
|
3203 |
pcibus_t addr, pcibus_t size, int type)
|
|
3204 | 3204 |
{ |
3205 | 3205 |
RTL8139State *s = DO_UPCAST(RTL8139State, dev, pci_dev); |
3206 | 3206 |
|
b/hw/sun4u.c | ||
---|---|---|
344 | 344 |
} |
345 | 345 |
|
346 | 346 |
static void ebus_mmio_mapfunc(PCIDevice *pci_dev, int region_num, |
347 |
uint32_t addr, uint32_t size, int type)
|
|
347 |
pcibus_t addr, pcibus_t size, int type)
|
|
348 | 348 |
{ |
349 | 349 |
DPRINTF("Mapping region %d registers at %08x\n", region_num, addr); |
350 | 350 |
switch (region_num) { |
b/hw/usb-ohci.c | ||
---|---|---|
1706 | 1706 |
} OHCIPCIState; |
1707 | 1707 |
|
1708 | 1708 |
static void ohci_mapfunc(PCIDevice *pci_dev, int i, |
1709 |
uint32_t addr, uint32_t size, int type)
|
|
1709 |
pcibus_t addr, pcibus_t size, int type)
|
|
1710 | 1710 |
{ |
1711 | 1711 |
OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, pci_dev); |
1712 | 1712 |
cpu_register_physical_memory(addr, size, ohci->state.mem); |
b/hw/usb-uhci.c | ||
---|---|---|
1047 | 1047 |
} |
1048 | 1048 |
|
1049 | 1049 |
static void uhci_map(PCIDevice *pci_dev, int region_num, |
1050 |
uint32_t addr, uint32_t size, int type)
|
|
1050 |
pcibus_t addr, pcibus_t size, int type)
|
|
1051 | 1051 |
{ |
1052 | 1052 |
UHCIState *s = (UHCIState *)pci_dev; |
1053 | 1053 |
|
b/hw/vga-pci.c | ||
---|---|---|
48 | 48 |
}; |
49 | 49 |
|
50 | 50 |
static void vga_map(PCIDevice *pci_dev, int region_num, |
51 |
uint32_t addr, uint32_t size, int type)
|
|
51 |
pcibus_t addr, pcibus_t size, int type)
|
|
52 | 52 |
{ |
53 | 53 |
PCIVGAState *d = (PCIVGAState *)pci_dev; |
54 | 54 |
VGACommonState *s = &d->vga; |
b/hw/virtio-pci.c | ||
---|---|---|
344 | 344 |
} |
345 | 345 |
|
346 | 346 |
static void virtio_map(PCIDevice *pci_dev, int region_num, |
347 |
uint32_t addr, uint32_t size, int type)
|
|
347 |
pcibus_t addr, pcibus_t size, int type)
|
|
348 | 348 |
{ |
349 | 349 |
VirtIOPCIProxy *proxy = container_of(pci_dev, VirtIOPCIProxy, pci_dev); |
350 | 350 |
VirtIODevice *vdev = proxy->vdev; |
b/hw/vmware_vga.c | ||
---|---|---|
1126 | 1126 |
} |
1127 | 1127 |
|
1128 | 1128 |
static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num, |
1129 |
uint32_t addr, uint32_t size, int type)
|
|
1129 |
pcibus_t addr, pcibus_t size, int type)
|
|
1130 | 1130 |
{ |
1131 | 1131 |
struct pci_vmsvga_state_s *d = (struct pci_vmsvga_state_s *) pci_dev; |
1132 | 1132 |
struct vmsvga_state_s *s = &d->chip; |
... | ... | |
1146 | 1146 |
} |
1147 | 1147 |
|
1148 | 1148 |
static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num, |
1149 |
uint32_t addr, uint32_t size, int type)
|
|
1149 |
pcibus_t addr, pcibus_t size, int type)
|
|
1150 | 1150 |
{ |
1151 | 1151 |
struct pci_vmsvga_state_s *d = (struct pci_vmsvga_state_s *) pci_dev; |
1152 | 1152 |
struct vmsvga_state_s *s = &d->chip; |
b/hw/wdt_i6300esb.c | ||
---|---|---|
343 | 343 |
} |
344 | 344 |
|
345 | 345 |
static void i6300esb_map(PCIDevice *dev, int region_num, |
346 |
uint32_t addr, uint32_t size, int type)
|
|
346 |
pcibus_t addr, pcibus_t size, int type)
|
|
347 | 347 |
{ |
348 | 348 |
static CPUReadMemoryFunc * const mem_read[3] = { |
349 | 349 |
i6300esb_mem_readb, |
Also available in: Unified diff