Changeset 41825 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 19, 2012 2:14:28 PM (12 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r41816 r41825 242 242 243 243 #ifdef IN_RING3 244 /**245 * Reads data via bus mastering, if enabled. If no bus mastering is available,246 * this function does nothing and returns VINF_NOT_SUPPORTED.247 *248 * @return IPRT status code.249 */250 int PCIDevPhysRead(PPCIDEVICE pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead)251 {252 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER);253 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);254 AssertReturn(cbRead, VERR_INVALID_PARAMETER);255 256 if (!PCIDevIsBusmaster(pPciDev))257 {258 #ifdef DEBUG259 Log2(("%s: %RU16:%RU16: No bus master (anymore), skipping read %p (%z)\n", __FUNCTION__,260 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbRead));261 #endif262 return VINF_NOT_SUPPORTED;263 }264 265 return PDMDevHlpPhysRead(pPciDev->pDevIns, GCPhys, pvBuf, cbRead);266 }267 268 /**269 * Writes data via bus mastering, if enabled. If no bus mastering is available,270 * this function does nothing and returns VINF_NOT_SUPPORTED.271 *272 * @return IPRT status code.273 */274 int PCIDevPhysWrite(PPCIDEVICE pPciDev, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite)275 {276 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER);277 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);278 AssertReturn(cbWrite, VERR_INVALID_PARAMETER);279 280 if (!PCIDevIsBusmaster(pPciDev))281 {282 #ifdef DEBUG283 Log2(("%s: %RU16:%RU16: No bus master (anymore), skipping write %p (%z)\n", __FUNCTION__,284 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbWrite));285 #endif286 return VINF_NOT_SUPPORTED;287 }288 289 return PDMDevHlpPhysWrite(pPciDev->pDevIns, GCPhys, pvBuf, cbWrite);290 }291 292 244 static void pci_update_mappings(PCIDevice *d) 293 245 { -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r41815 r41825 5017 5017 AssertPtr(pATAState); 5018 5018 if (uTxDir == PDMBLOCKTXDIR_FROM_DEVICE) 5019 P CIDevPhysWrite(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen);5019 PDMDevHlpPCIDevPhysWrite(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen); 5020 5020 else 5021 P CIDevPhysRead(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen);5021 PDMDevHlpPCIDevPhysRead(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen); 5022 5022 5023 5023 iIOBufferCur += dmalen;
Note:
See TracChangeset
for help on using the changeset viewer.