Changeset 44897 in vbox for trunk/src/VBox
- Timestamp:
- Mar 1, 2013 9:44:24 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84067
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r44516 r44897 4878 4878 AssertPtr(pATAState); 4879 4879 if (uTxDir == PDMBLOCKTXDIR_FROM_DEVICE) 4880 PDMDevHlpPCI DevPhysWrite(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen);4880 PDMDevHlpPCIPhysWrite(pDevIns, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen); 4881 4881 else 4882 PDMDevHlpPCI DevPhysRead(&pATAState->dev, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen);4882 PDMDevHlpPCIPhysRead(pDevIns, pBuffer, s->CTX_SUFF(pbIOBuffer) + iIOBufferCur, dmalen); 4883 4883 4884 4884 iIOBufferCur += dmalen; -
trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
r44528 r44897 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 78 78 { 79 79 PDMDEV_ASSERT_DEVINS(pDevIns); 80 LogFlow(("pdmR0DevHlp_PCIPhysRead: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbRead=%#x\n", 81 pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbRead)); 82 83 PCIDevice *pPciDev = pDevIns->Internal.s.pPciDeviceR0; 84 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER); 80 81 /* 82 * Just check the busmaster setting here and forward the request to the generic read helper. 83 */ 84 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceR0; 85 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 85 86 86 87 if (!PCIDevIsBusmaster(pPciDev)) 87 88 { 88 #ifdef DEBUG 89 LogFlow(("%s: %RU16:%RU16: No bus master (anymore), skipping read %p (%z)\n", __FUNCTION__, 90 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbRead)); 91 #endif 92 return VINF_PDM_PCI_PHYS_READ_BM_DISABLED; 93 } 94 95 return pdmR0DevHlp_PhysRead(pDevIns, GCPhys, pvBuf, cbRead); 89 Log(("pdmRCDevHlp_PCIPhysRead: caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#z\n", 90 pDevIns, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead)); 91 return VERR_PDM_NOT_PCI_BUS_MASTER; 92 } 93 94 return pDevIns->pHlpR0->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead); 96 95 } 97 96 … … 101 100 { 102 101 PDMDEV_ASSERT_DEVINS(pDevIns); 103 LogFlow(("pdmR0DevHlp_PCIPhysWrite: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbWrite=%#x\n", 104 pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbWrite)); 105 106 PCIDevice *pPciDev = pDevIns->Internal.s.pPciDeviceR0; 107 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER); 102 103 /* 104 * Just check the busmaster setting here and forward the request to the generic read helper. 105 */ 106 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceR0; 107 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 108 108 109 109 if (!PCIDevIsBusmaster(pPciDev)) 110 110 { 111 #ifdef DEBUG 112 LogFlow(("%s: %RU16:%RU16: No bus master (anymore), skipping write %p (%z)\n", __FUNCTION__, 113 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbWrite)); 114 #endif 115 return VINF_PDM_PCI_PHYS_WRITE_BM_DISABLED; 116 } 117 118 return pdmR0DevHlp_PhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 111 Log(("pdmRCDevHlp_PCIPhysWrite: caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#z\n", 112 pDevIns, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite)); 113 return VERR_PDM_NOT_PCI_BUS_MASTER; 114 } 115 116 return pDevIns->pHlpR0->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 119 117 } 120 118 -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r44691 r44897 1082 1082 1083 1083 1084 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIDevPhysRead} */1085 static DECLCALLBACK(int) pdmR3DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead)1086 {1087 PDMDEV_ASSERT_DEVINS(pDevIns);1088 return PDMDevHlpPCIDevPhysRead(pDevIns->Internal.s.pPciDeviceR3, GCPhys, pvBuf, cbRead);1089 }1090 1091 1092 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIDevPhysWrite} */1093 static DECLCALLBACK(int) pdmR3DevHlp_PCIPhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite)1094 {1095 PDMDEV_ASSERT_DEVINS(pDevIns);1096 return PDMDevHlpPCIDevPhysWrite(pDevIns->Internal.s.pPciDeviceR3, GCPhys, pvBuf, cbWrite);1097 }1098 1099 1100 1084 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIRegister} */ 1101 1085 static DECLCALLBACK(int) pdmR3DevHlp_PCIRegister(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev) … … 1365 1349 1366 1350 LogFlow(("pdmR3DevHlp_PCISetConfigCallbacks: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1351 } 1352 1353 1354 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysRead} */ 1355 static DECLCALLBACK(int) pdmR3DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead) 1356 { 1357 PDMDEV_ASSERT_DEVINS(pDevIns); 1358 1359 /* 1360 * Just check the busmaster setting here and forward the request to the generic read helper. 1361 */ 1362 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceR3; 1363 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 1364 1365 if (!PCIDevIsBusmaster(pPciDev)) 1366 { 1367 Log(("pdmR3DevHlp_PCIPhysRead: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#z\n", 1368 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead)); 1369 return VERR_PDM_NOT_PCI_BUS_MASTER; 1370 } 1371 1372 return pDevIns->pHlpR3->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead); 1373 } 1374 1375 1376 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysRead} */ 1377 static DECLCALLBACK(int) pdmR3DevHlp_PCIPhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite) 1378 { 1379 PDMDEV_ASSERT_DEVINS(pDevIns); 1380 1381 /* 1382 * Just check the busmaster setting here and forward the request to the generic read helper. 1383 */ 1384 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceR3; 1385 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 1386 1387 if (!PCIDevIsBusmaster(pPciDev)) 1388 { 1389 Log(("pdmR3DevHlp_PCIPhysWrite: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#z\n", 1390 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite)); 1391 return VERR_PDM_NOT_PCI_BUS_MASTER; 1392 } 1393 1394 return pDevIns->pHlpR3->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 1367 1395 } 1368 1396 … … 3396 3424 pdmR3DevHlp_STAMRegisterF, 3397 3425 pdmR3DevHlp_STAMRegisterV, 3398 pdmR3DevHlp_PCIPhysRead,3399 pdmR3DevHlp_PCIPhysWrite,3400 3426 pdmR3DevHlp_PCIRegister, 3401 3427 pdmR3DevHlp_PCIRegisterMsi, 3402 3428 pdmR3DevHlp_PCIIORegionRegister, 3403 3429 pdmR3DevHlp_PCISetConfigCallbacks, 3430 pdmR3DevHlp_PCIPhysRead, 3431 pdmR3DevHlp_PCIPhysWrite, 3404 3432 pdmR3DevHlp_PCISetIrq, 3405 3433 pdmR3DevHlp_PCISetIrqNoWait, … … 3627 3655 pdmR3DevHlp_STAMRegisterF, 3628 3656 pdmR3DevHlp_STAMRegisterV, 3629 pdmR3DevHlp_PCIPhysRead,3630 pdmR3DevHlp_PCIPhysWrite,3631 3657 pdmR3DevHlp_PCIRegister, 3632 3658 pdmR3DevHlp_PCIRegisterMsi, 3633 3659 pdmR3DevHlp_PCIIORegionRegister, 3634 3660 pdmR3DevHlp_PCISetConfigCallbacks, 3661 pdmR3DevHlp_PCIPhysRead, 3662 pdmR3DevHlp_PCIPhysWrite, 3635 3663 pdmR3DevHlp_PCISetIrq, 3636 3664 pdmR3DevHlp_PCISetIrqNoWait, -
trunk/src/VBox/VMM/VMMRC/PDMRCDevice.cpp
r44362 r44897 75 75 { 76 76 PDMDEV_ASSERT_DEVINS(pDevIns); 77 LogFlow(("pdmRCDevHlp_PCIPhysRead: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbRead=%#x\n", 78 pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbRead)); 79 80 PCIDevice *pPciDev = pDevIns->Internal.s.pPciDeviceRC; 81 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER); 77 78 /* 79 * Just check the busmaster setting here and forward the request to the generic read helper. 80 */ 81 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceRC; 82 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 82 83 83 84 if (!PCIDevIsBusmaster(pPciDev)) 84 85 { 85 #ifdef DEBUG 86 LogFlow(("%s: %RU16:%RU16: No bus master (anymore), skipping read %p (%z)\n", __FUNCTION__, 87 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbRead)); 88 #endif 89 return VINF_PDM_PCI_PHYS_READ_BM_DISABLED; 90 } 91 92 return pdmRCDevHlp_PhysRead(pDevIns, GCPhys, pvBuf, cbRead); 86 Log(("pdmRCDevHlp_PCIPhysRead: caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#z\n", 87 pDevIns, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead)); 88 return VERR_PDM_NOT_PCI_BUS_MASTER; 89 } 90 91 return pDevIns->pHlpRC->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead); 93 92 } 94 93 … … 98 97 { 99 98 PDMDEV_ASSERT_DEVINS(pDevIns); 100 LogFlow(("pdmRCDevHlp_PCIPhysWrite: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbWrite=%#x\n", 101 pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbWrite)); 102 103 PCIDevice *pPciDev = pDevIns->Internal.s.pPciDeviceRC; 104 AssertPtrReturn(pPciDev, VERR_INVALID_POINTER); 99 100 /* 101 * Just check the busmaster setting here and forward the request to the generic read helper. 102 */ 103 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceRC; 104 AssertReleaseMsg(pPciDev, ("No PCI device registered!\n")); 105 105 106 106 if (!PCIDevIsBusmaster(pPciDev)) 107 107 { 108 #ifdef DEBUG 109 LogFlow(("%s: %RU16:%RU16: No bus master (anymore), skipping write %p (%z)\n", __FUNCTION__, 110 PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev), pvBuf, cbWrite)); 111 #endif 112 return VINF_PDM_PCI_PHYS_WRITE_BM_DISABLED; 113 } 114 115 return pdmRCDevHlp_PhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 108 Log(("pdmRCDevHlp_PCIPhysWrite: caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#z\n", 109 pDevIns, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite)); 110 return VERR_PDM_NOT_PCI_BUS_MASTER; 111 } 112 113 return pDevIns->pHlpRC->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 116 114 } 117 115
Note:
See TracChangeset
for help on using the changeset viewer.