Changeset 81136 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 8, 2019 8:26:49 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 133769
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r80960 r81136 104 104 * Found an entry, get the data so we can leave the IOM lock. 105 105 */ 106 uint16_t const fFlags = pRegEntry->fFlags; 106 107 PFNIOMIOPORTNEWIN pfnInCallback = pRegEntry->pfnInCallback; 107 108 PPDMDEVINS pDevIns = pRegEntry->pDevIns; … … 130 131 { 131 132 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfIn), a); 132 rcStrict = pfnInCallback(pDevIns, pvUser, Port, pu32Value, (unsigned)cbValue);133 rcStrict = pfnInCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? Port : offPort, pu32Value, (unsigned)cbValue); 133 134 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfIn), a); 134 135 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo)); … … 349 350 * Found an entry, get the data so we can leave the IOM lock. 350 351 */ 352 uint16_t const fFlags = pRegEntry->fFlags; 351 353 PFNIOMIOPORTNEWINSTRING pfnInStrCallback = pRegEntry->pfnInStrCallback; 352 354 PFNIOMIOPORTNEWIN pfnInCallback = pRegEntry->pfnInCallback; … … 381 383 { 382 384 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfIn), a); 383 rcStrict = pfnInStrCallback(pDevIns, pvUser, uPort, (uint8_t *)pvDst, pcTransfers, cb); 385 rcStrict = pfnInStrCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? uPort : offPort, 386 (uint8_t *)pvDst, pcTransfers, cb); 384 387 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfIn), a); 385 388 } … … 396 399 uint32_t u32Value = 0; 397 400 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfIn), a); 398 rcStrict = pfnInCallback(pDevIns, pvUser, uPort, &u32Value, cb);401 rcStrict = pfnInCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? uPort : offPort, &u32Value, cb); 399 402 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfIn), a); 400 403 if (rcStrict == VERR_IOM_IOPORT_UNUSED) … … 671 674 * Found an entry, get the data so we can leave the IOM lock. 672 675 */ 676 uint16_t const fFlags = pRegEntry->fFlags; 673 677 PFNIOMIOPORTNEWOUT pfnOutCallback = pRegEntry->pfnOutCallback; 674 678 PPDMDEVINS pDevIns = pRegEntry->pDevIns; … … 697 701 { 698 702 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfOut), a); 699 rcStrict = pfnOutCallback(pDevIns, pvUser, Port, u32Value, (unsigned)cbValue);703 rcStrict = pfnOutCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? Port : offPort, u32Value, (unsigned)cbValue); 700 704 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfOut), a); 701 705 … … 892 896 * Found an entry, get the data so we can leave the IOM lock. 893 897 */ 898 uint16_t const fFlags = pRegEntry->fFlags; 894 899 PFNIOMIOPORTNEWOUTSTRING pfnOutStrCallback = pRegEntry->pfnOutStrCallback; 895 900 PFNIOMIOPORTNEWOUT pfnOutCallback = pRegEntry->pfnOutCallback; … … 924 929 { 925 930 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfOut), a); 926 rcStrict = pfnOutStrCallback(pDevIns, pvUser, uPort, (uint8_t const *)pvSrc, pcTransfers, cb); 931 rcStrict = pfnOutStrCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? uPort : offPort, 932 (uint8_t const *)pvSrc, pcTransfers, cb); 927 933 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfOut), a); 928 934 } … … 946 952 } 947 953 STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfOut), a); 948 rcStrict = pfnOutCallback(pDevIns, pvUser, uPort, u32Value, cb);954 rcStrict = pfnOutCallback(pDevIns, pvUser, fFlags & IOM_IOPORT_F_ABS ? uPort : offPort, u32Value, cb); 949 955 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfOut), a); 950 956 if (IOM_SUCCESS(rcStrict)) -
trunk/src/VBox/VMM/VMMR0/IOMR0.cpp
r81056 r81136 111 111 AssertPtrNullReturn(pfnInStr, VERR_INVALID_POINTER); 112 112 113 uint16_t const fFlags = pGVM->iomr0.s.paIoPortRing3Regs[hIoPorts].fFlags; 113 114 RTIOPORT const cPorts = pGVM->iomr0.s.paIoPortRing3Regs[hIoPorts].cPorts; 114 115 AssertMsgReturn(cPorts > 0 && cPorts <= _8K, ("cPorts=%s\n", cPorts), VERR_IOM_INVALID_IOPORT_HANDLE); … … 124 125 pGVM->iomr0.s.paIoPortRegs[hIoPorts].pfnInStrCallback = pfnInStr; 125 126 pGVM->iomr0.s.paIoPortRegs[hIoPorts].cPorts = cPorts; 127 pGVM->iomr0.s.paIoPortRegs[hIoPorts].fFlags = fFlags; 126 128 #ifdef VBOX_WITH_STATISTICS 127 129 uint16_t const idxStats = pGVM->iomr0.s.paIoPortRing3Regs[hIoPorts].idxStats; -
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r81056 r81136 471 471 472 472 AssertMsgReturn(cPorts > 0 && cPorts <= _8K, ("cPorts=%s\n", cPorts), VERR_OUT_OF_RANGE); 473 AssertReturn(! fFlags, VERR_INVALID_FLAGS);473 AssertReturn(!(fFlags & ~IOM_IOPORT_F_VALID_MASK), VERR_INVALID_FLAGS); 474 474 475 475 AssertReturn(pfnOut || pfnIn || pfnOutStr || pfnInStr, VERR_INVALID_PARAMETER); … … 540 540 pVM->iom.s.paIoPortRegs[idx].idxStats = (uint16_t)idxStats; 541 541 pVM->iom.s.paIoPortRegs[idx].fMapped = false; 542 pVM->iom.s.paIoPortRegs[idx].fFlags = (uint8_t)fFlags; 542 543 pVM->iom.s.paIoPortRegs[idx].idxSelf = idx; 543 544 -
trunk/src/VBox/VMM/include/IOMInternal.h
r81056 r81136 180 180 /** Same as the handle index. */ 181 181 uint16_t idxSelf; 182 /** IOM_IOPORT_F_XXX (copied from ring-3). */ 183 uint16_t fFlags; 182 184 } IOMIOPORTENTRYR0; 183 185 /** Pointer to a ring-0 I/O port handle table entry. */ … … 225 227 /** Set if there is an raw-mode entry too. */ 226 228 bool fRawMode; 227 bool fUnused; 229 /** IOM_IOPORT_F_XXX */ 230 uint8_t fFlags; 228 231 /** Same as the handle index. */ 229 232 uint16_t idxSelf;
Note:
See TracChangeset
for help on using the changeset viewer.