Revision 6f4cbd39 hw/pci.h
b/hw/pci.h | ||
---|---|---|
121 | 121 |
#define PCI_MIN_GNT 0x3e /* 8 bits */ |
122 | 122 |
#define PCI_MAX_LAT 0x3f /* 8 bits */ |
123 | 123 |
|
124 |
/* Capability lists */ |
|
125 |
#define PCI_CAP_LIST_ID 0 /* Capability ID */ |
|
126 |
#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ |
|
127 |
|
|
124 | 128 |
#define PCI_REVISION 0x08 /* obsolete, use PCI_REVISION_ID */ |
125 | 129 |
#define PCI_SUBVENDOR_ID 0x2c /* obsolete, use PCI_SUBSYSTEM_VENDOR_ID */ |
126 | 130 |
#define PCI_SUBDEVICE_ID 0x2e /* obsolete, use PCI_SUBSYSTEM_ID */ |
... | ... | |
128 | 132 |
/* Bits in the PCI Status Register (PCI 2.3 spec) */ |
129 | 133 |
#define PCI_STATUS_RESERVED1 0x007 |
130 | 134 |
#define PCI_STATUS_INT_STATUS 0x008 |
131 |
#define PCI_STATUS_CAPABILITIES 0x010
|
|
135 |
#define PCI_STATUS_CAP_LIST 0x010
|
|
132 | 136 |
#define PCI_STATUS_66MHZ 0x020 |
133 | 137 |
#define PCI_STATUS_RESERVED2 0x040 |
134 | 138 |
#define PCI_STATUS_FAST_BACK 0x080 |
... | ... | |
158 | 162 |
/* Used to implement R/W bytes */ |
159 | 163 |
uint8_t wmask[PCI_CONFIG_SPACE_SIZE]; |
160 | 164 |
|
165 |
/* Used to allocate config space for capabilities. */ |
|
166 |
uint8_t used[PCI_CONFIG_SPACE_SIZE]; |
|
167 |
|
|
161 | 168 |
/* the following fields are read only */ |
162 | 169 |
PCIBus *bus; |
163 | 170 |
int devfn; |
... | ... | |
186 | 193 |
uint32_t size, int type, |
187 | 194 |
PCIMapIORegionFunc *map_func); |
188 | 195 |
|
196 |
int pci_add_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size); |
|
197 |
|
|
198 |
void pci_del_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size); |
|
199 |
|
|
200 |
void pci_reserve_capability(PCIDevice *pci_dev, uint8_t offset, uint8_t size); |
|
201 |
|
|
202 |
uint8_t pci_find_capability(PCIDevice *pci_dev, uint8_t cap_id); |
|
203 |
|
|
204 |
|
|
189 | 205 |
uint32_t pci_default_read_config(PCIDevice *d, |
190 | 206 |
uint32_t address, int len); |
191 | 207 |
void pci_default_write_config(PCIDevice *d, |
Also available in: Unified diff