Changeset 44573 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 6, 2013 3:24:36 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r44564 r44573 78 78 * Deals with complicated MMIO writes. 79 79 * 80 * Complicat d means unaligned or non-dword/qword alignaccesses depending on80 * Complicated means unaligned or non-dword/qword sized accesses depending on 81 81 * the MMIO region's access mode flags. 82 82 * … … 98 98 AssertReturn(cbValue != 0 && cbValue <= 16, VERR_IOM_MMIO_IPE_2); 99 99 RTGCPHYS const GCPhysStart = GCPhys; NOREF(GCPhysStart); 100 bool const fReadMissing = (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) >= IOMMMIO_FLAGS_WRITE_DWORD_READ_MISSING; 100 bool const fReadMissing = (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_DWORD_READ_MISSING 101 || (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING; 101 102 102 103 /* … … 121 122 * Check if we should ignore the write. 122 123 */ 123 if ( pRange->fFlags &IOMMMIO_FLAGS_WRITE_ONLY_DWORD)124 if ((pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_ONLY_DWORD) 124 125 { 125 126 Assert(cbValue != 4 || (GCPhys & 3)); 127 return VINF_SUCCESS; 128 } 129 if ((pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_ONLY_DWORD_QWORD) 130 { 131 Assert((cbValue != 4 && cbValue != 8) || (GCPhys & (cbValue - 1))); 126 132 return VINF_SUCCESS; 127 133 } … … 160 166 /** @todo What if we've split a transfer and already read 161 167 * something? Since writes generally have sideeffects we 162 * could be kind of screwed here... */ 168 * could be kind of screwed here... 169 * 170 * Fix: Save the current state and resume it in ring-3. Requires EM to not go 171 * to REM for MMIO accesses (like may currently do). */ 172 163 173 LogFlow(("iomMMIODoComplicatedWrite: GCPhys=%RGp GCPhysStart=%RGp cbValue=%u rc=%Rrc [read]\n", GCPhys, GCPhysStart, cbValue, rc2)); 164 174 return rc2; … … 206 216 { 207 217 u32GivenValue <<= offAccess * 8; 208 u32GivenMask <<= offAccess * 8;218 u32GivenMask <<= offAccess * 8; 209 219 } 210 220 … … 226 236 /** @todo What if we've split a transfer and already read 227 237 * something? Since reads can have sideeffects we could be 228 * kind of screwed here... */ 238 * kind of screwed here... 239 * 240 * Fix: Save the current state and resume it in ring-3. Requires EM to not go 241 * to REM for MMIO accesses (like may currently do). */ 229 242 LogFlow(("iomMMIODoComplicatedWrite: GCPhys=%RGp GCPhysStart=%RGp cbValue=%u rc=%Rrc [write]\n", GCPhys, GCPhysStart, cbValue, rc2)); 230 243 return rc2; … … 274 287 if ( (cb == 4 && !(GCPhysFault & 3)) 275 288 || (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_PASSTHRU 276 || (cb == 8 && !(GCPhysFault & 7) ) )289 || (cb == 8 && !(GCPhysFault & 7) && IOMMMIO_DOES_WRITE_MODE_ALLOW_QWORD(pRange->fFlags)) ) 277 290 rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), 278 291 GCPhysFault, (void *)pvData, cb); /** @todo fix const!! */ -
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r44564 r44573 1419 1419 AssertMsgReturn( !(fFlags & ~IOMMMIO_FLAGS_VALID_MASK) 1420 1420 && (fFlags & IOMMMIO_FLAGS_READ_MODE) <= IOMMMIO_FLAGS_READ_DWORD_QWORD 1421 && (fFlags & IOMMMIO_FLAGS_WRITE_MODE) <= IOMMMIO_FLAGS_WRITE_ONLY_DWORD ,1421 && (fFlags & IOMMMIO_FLAGS_WRITE_MODE) <= IOMMMIO_FLAGS_WRITE_ONLY_DWORD_QWORD, 1422 1422 ("%#x\n", fFlags), 1423 1423 VERR_INVALID_PARAMETER);
Note:
See TracChangeset
for help on using the changeset viewer.