Changeset 80960 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Sep 23, 2019 8:54:03 PM (5 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/iom.h
r80679 r80960 243 243 typedef FNIOMIOPORTOUTSTRING *PFNIOMIOPORTOUTSTRING; 244 244 245 246 /** 247 * Port I/O Handler for IN operations. 248 * 249 * @returns VINF_SUCCESS or VINF_EM_*. 250 * @returns VERR_IOM_IOPORT_UNUSED if the port is really unused and a ~0 value should be returned. 251 * 252 * @param pDevIns The device instance. 253 * @param pvUser User argument. 254 * @param uPort Port number used for the IN operation. 255 * @param pu32 Where to store the result. This is always a 32-bit 256 * variable regardless of what @a cb might say. 257 * @param cb Number of bytes read. 258 * @remarks Caller enters the device critical section. 259 */ 260 typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMIOPORTNEWIN(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32, unsigned cb); 261 /** Pointer to a FNIOMIOPORTNEWIN(). */ 262 typedef FNIOMIOPORTNEWIN *PFNIOMIOPORTNEWIN; 263 264 /** 265 * Port I/O Handler for string IN operations. 266 * 267 * @returns VINF_SUCCESS or VINF_EM_*. 268 * @returns VERR_IOM_IOPORT_UNUSED if the port is really unused and a ~0 value should be returned. 269 * 270 * @param pDevIns The device instance. 271 * @param pvUser User argument. 272 * @param uPort Port number used for the IN operation. 273 * @param pbDst Pointer to the destination buffer. 274 * @param pcTransfers Pointer to the number of transfer units to read, on 275 * return remaining transfer units. 276 * @param cb Size of the transfer unit (1, 2 or 4 bytes). 277 * @remarks Caller enters the device critical section. 278 */ 279 typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMIOPORTNEWINSTRING(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint8_t *pbDst, 280 uint32_t *pcTransfers, unsigned cb); 281 /** Pointer to a FNIOMIOPORTNEWINSTRING(). */ 282 typedef FNIOMIOPORTNEWINSTRING *PFNIOMIOPORTNEWINSTRING; 283 284 /** 285 * Port I/O Handler for OUT operations. 286 * 287 * @returns VINF_SUCCESS or VINF_EM_*. 288 * 289 * @param pDevIns The device instance. 290 * @param pvUser User argument. 291 * @param uPort Port number used for the OUT operation. 292 * @param u32 The value to output. 293 * @param cb The value size in bytes. 294 * @remarks Caller enters the device critical section. 295 */ 296 typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMIOPORTNEWOUT(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t u32, unsigned cb); 297 /** Pointer to a FNIOMIOPORTNEWOUT(). */ 298 typedef FNIOMIOPORTNEWOUT *PFNIOMIOPORTNEWOUT; 299 300 /** 301 * Port I/O Handler for string OUT operations. 302 * 303 * @returns VINF_SUCCESS or VINF_EM_*. 304 * 305 * @param pDevIns The device instance. 306 * @param pvUser User argument. 307 * @param uPort Port number used for the OUT operation. 308 * @param pbSrc Pointer to the source buffer. 309 * @param pcTransfers Pointer to the number of transfer units to write, on 310 * return remaining transfer units. 311 * @param cb Size of the transfer unit (1, 2 or 4 bytes). 312 * @remarks Caller enters the device critical section. 313 */ 314 typedef DECLCALLBACK(VBOXSTRICTRC) FNIOMIOPORTNEWOUTSTRING(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, const uint8_t *pbSrc, 315 uint32_t *pcTransfers, unsigned cb); 316 /** Pointer to a FNIOMIOPORTNEWOUTSTRING(). */ 317 typedef FNIOMIOPORTNEWOUTSTRING *PFNIOMIOPORTNEWOUTSTRING; 318 245 319 /** 246 320 * I/O port description. … … 338 412 339 413 VMMR3_INT_DECL(int) IOMR3IoPortCreate(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev, 340 uint32_t iPciRegion, PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,341 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, RTR3PTR pvUser,414 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 415 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, RTR3PTR pvUser, 342 416 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts); 343 417 VMMR3_INT_DECL(int) IOMR3IoPortMap(PVM pVM, PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, RTIOPORT Port); … … 409 483 VMMR0_INT_DECL(void) IOMR0CleanupVM(PGVM pGVM); 410 484 VMMR0_INT_DECL(int) IOMR0IoPortSetUpContext(PGVM pGVM, PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 411 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,412 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, void *pvUser);485 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 486 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, void *pvUser); 413 487 VMMR0_INT_DECL(int) IOMR0IoPortGrowRegistrationTables(PGVM pGVM, uint64_t cMinEntries); 414 488 VMMR0_INT_DECL(int) IOMR0IoPortGrowStatisticsTable(PGVM pGVM, uint64_t cMinEntries); -
trunk/include/VBox/vmm/pdmdev.h
r80943 r80960 1058 1058 DECLRCCALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1059 1059 1060 /** 1061 * Gets a bus by it's PDM ordinal (typically the parent bus). 1062 * 1063 * @returns Pointer to the device instance of the bus. 1064 * @param pDevIns The PCI bus device instance. 1065 * @param idxPdmBus The PDM ordinal value of the bus to get. 1066 */ 1067 DECLRCCALLBACKMEMBER(PPDMDEVINS, pfnGetBusByNo,(PPDMDEVINS pDevIns, uint32_t idxPdmBus)); 1068 1060 1069 /** Just a safety precaution. */ 1061 1070 uint32_t u32TheEnd; … … 1111 1120 DECLR0CALLBACKMEMBER(void, pfnIoApicSendMsi,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue, uint32_t uTagSrc)); 1112 1121 1113 1114 1122 /** 1115 1123 * Acquires the PDM lock. … … 1128 1136 */ 1129 1137 DECLR0CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1138 1139 /** 1140 * Gets a bus by it's PDM ordinal (typically the parent bus). 1141 * 1142 * @returns Pointer to the device instance of the bus. 1143 * @param pDevIns The PCI bus device instance. 1144 * @param idxPdmBus The PDM ordinal value of the bus to get. 1145 */ 1146 DECLR0CALLBACKMEMBER(PPDMDEVINS, pfnGetBusByNo,(PPDMDEVINS pDevIns, uint32_t idxPdmBus)); 1130 1147 1131 1148 /** Just a safety precaution. */ … … 1138 1155 1139 1156 /** Current PDMPCIHLPR0 version number. */ 1140 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 3, 0)1157 #define PDM_PCIHLPR0_VERSION PDM_VERSION_MAKE(0xfffc, 4, 0) 1141 1158 1142 1159 /** … … 1190 1207 1191 1208 /** 1192 * Gets the address of the RC PCI Bus helpers.1193 *1194 * This should be called at both construction and relocation time1195 * to obtain the correct address of the RC helpers.1196 *1197 * @returns RC pointer to the PCI Bus helpers.1198 * @param pDevIns Device instance of the PCI Bus.1199 * @thread EMT only.1200 */1201 DECLR3CALLBACKMEMBER(PCPDMPCIHLPRC, pfnGetRCHelpers,(PPDMDEVINS pDevIns));1202 1203 /**1204 * Gets the address of the R0 PCI Bus helpers.1205 *1206 * This should be called at both construction and relocation time1207 * to obtain the correct address of the R0 helpers.1208 *1209 * @returns R0 pointer to the PCI Bus helpers.1210 * @param pDevIns Device instance of the PCI Bus.1211 * @thread EMT only.1212 */1213 DECLR3CALLBACKMEMBER(PCPDMPCIHLPR0, pfnGetR0Helpers,(PPDMDEVINS pDevIns));1214 1215 /**1216 1209 * Acquires the PDM lock. 1217 1210 * … … 1229 1222 */ 1230 1223 DECLR3CALLBACKMEMBER(void, pfnUnlock,(PPDMDEVINS pDevIns)); 1224 1225 /** 1226 * Gets a bus by it's PDM ordinal (typically the parent bus). 1227 * 1228 * @returns Pointer to the device instance of the bus. 1229 * @param pDevIns The PCI bus device instance. 1230 * @param idxPdmBus The PDM ordinal value of the bus to get. 1231 */ 1232 DECLR3CALLBACKMEMBER(PPDMDEVINS, pfnGetBusByNo,(PPDMDEVINS pDevIns, uint32_t idxPdmBus)); 1231 1233 1232 1234 /** Just a safety precaution. */ … … 1239 1241 1240 1242 /** Current PDMPCIHLPR3 version number. */ 1241 #define PDM_PCIHLPR3_VERSION PDM_VERSION_MAKE(0xfffb, 3, 1)1243 #define PDM_PCIHLPR3_VERSION PDM_VERSION_MAKE(0xfffb, 4, 0) 1242 1244 1243 1245 … … 2297 2299 */ 2298 2300 DECLR3CALLBACKMEMBER(int, pfnIoPortCreateEx,(PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev, 2299 uint32_t iPciRegion, PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,2300 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, RTR3PTR pvUser,2301 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 2302 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, RTR3PTR pvUser, 2301 2303 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts)); 2302 2304 … … 4410 4412 */ 4411 4413 DECLRCCALLBACKMEMBER(int, pfnIoPortSetUpContextEx,(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 4412 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,4413 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr,4414 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 4415 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, 4414 4416 void *pvUser)); 4415 4417 … … 4766 4768 */ 4767 4769 DECLR0CALLBACKMEMBER(int, pfnIoPortSetUpContextEx,(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 4768 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,4769 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr,4770 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 4771 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, 4770 4772 void *pvUser)); 4771 4773 … … 5532 5534 * Combines PDMDevHlpIoPortCreate() & PDMDevHlpIoPortMap(). 5533 5535 */ 5534 DECLINLINE(int) PDMDevHlpIoPortCreateAndMap(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, PFNIOMIOPORT OUT pfnOut,5535 PFNIOMIOPORT IN pfnIn, const char *pszDesc, PCIOMIOPORTDESC paExtDescs,5536 DECLINLINE(int) PDMDevHlpIoPortCreateAndMap(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, PFNIOMIOPORTNEWOUT pfnOut, 5537 PFNIOMIOPORTNEWIN pfnIn, const char *pszDesc, PCIOMIOPORTDESC paExtDescs, 5536 5538 PIOMIOPORTHANDLE phIoPorts) 5537 5539 { … … 5547 5549 */ 5548 5550 DECLINLINE(int) PDMDevHlpIoPortCreate(PPDMDEVINS pDevIns, RTIOPORT cPorts, PPDMPCIDEV pPciDev, uint32_t iPciRegion, 5549 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn, void *pvUser, const char *pszDesc,5551 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, void *pvUser, const char *pszDesc, 5550 5552 PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts) 5551 5553 { … … 5558 5560 */ 5559 5561 DECLINLINE(int) PDMDevHlpIoPortCreateEx(PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev, 5560 uint32_t iPciRegion, PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,5561 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, void *pvUser,5562 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 5563 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, void *pvUser, 5562 5564 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts) 5563 5565 { … … 5589 5591 */ 5590 5592 DECLINLINE(int) PDMDevHlpIoPortSetUpContext(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 5591 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn, void *pvUser)5593 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, void *pvUser) 5592 5594 { 5593 5595 return pDevIns->CTX_SUFF(pHlp)->pfnIoPortSetUpContextEx(pDevIns, hIoPorts, pfnOut, pfnIn, NULL, NULL, pvUser); … … 5598 5600 */ 5599 5601 DECLINLINE(int) PDMDevHlpIoPortSetUpContextEx(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 5600 PFNIOMIOPORT OUT pfnOut, PFNIOMIOPORTIN pfnIn,5601 PFNIOMIOPORT OUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, void *pvUser)5602 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 5603 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, void *pvUser) 5602 5604 { 5603 5605 return pDevIns->CTX_SUFF(pHlp)->pfnIoPortSetUpContextEx(pDevIns, hIoPorts, pfnOut, pfnIn, pfnOutStr, pfnInStr, pvUser); -
trunk/include/VBox/vmm/pdmpcidevint.h
r80943 r80960 178 178 R3PTRTYPE(PFNPCIBRIDGECONFIGWRITE) pfnBridgeConfigWrite; 179 179 180 /** Pointer to the PCI bus of the device. (R0 ptr)181 * @note Only used by ich9pcibridgeSetIrq to find the host (root) bus. */182 R0PTRTYPE(struct DEVPCIBUS *) pBusR0;183 180 /** Page used for MSI-X state. (R0 ptr) */ 184 181 R0PTRTYPE(void *) pMsixPageR0; 185 186 /** Pointer to the PCI bus of the device. (RC ptr)187 * @note Only used by ich9pcibridgeSetIrq to find the host (root) bus. */188 RCPTRTYPE(struct DEVPCIBUS *) pBusRC;189 182 /** Page used for MSI-X state. (RC ptr) */ 190 183 RCPTRTYPE(void *) pMsixPageRC; … … 211 204 /** Offset to the PBA for MSI-X. */ 212 205 uint16_t offMsixPba; 213 #if HC_ARCH_BITS == 32 214 /** Add padding to align aIORegions to an 8 byte boundary. */ 215 uint8_t abPadding2[12]; 216 #endif 206 /** Add padding to align aIORegions to an 16 byte boundary. */ 207 uint8_t abPadding2[HC_ARCH_BITS == 32 ? 4+8 : 4+8]; 217 208 218 209 /** Pointer to bus specific data. (R3 ptr) */
Note:
See TracChangeset
for help on using the changeset viewer.