Changeset 41847 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jun 20, 2012 1:43:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
r41800 r41847 57 57 58 58 /******************************************************************************* 59 * Prototypes * 60 *******************************************************************************/ 61 static int pdmR0DevHlp_PhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead); 62 static int pdmR0DevHlp_PhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite); 63 64 65 /******************************************************************************* 59 66 * Internal Functions * 60 67 *******************************************************************************/ … … 66 73 * @{ 67 74 */ 75 76 /** @interface_method_impl{PDMDEVHLPR0,pfnPCIPhysRead} */ 77 static DECLCALLBACK(int) pdmR0DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead) 78 { 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); 85 86 if (!PCIDevIsBusmaster(pPciDev)) 87 { 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); 96 } 97 98 99 /** @interface_method_impl{PDMDEVHLPR0,pfnPCIPhysRead} */ 100 static DECLCALLBACK(int) pdmR0DevHlp_PCIPhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite) 101 { 102 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); 108 109 if (!PCIDevIsBusmaster(pPciDev)) 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); 119 } 120 68 121 69 122 /** @interface_method_impl{PDMDEVHLPR0,pfnPCISetIrq} */ … … 331 384 { 332 385 PDM_DEVHLPR0_VERSION, 386 pdmR0DevHlp_PCIPhysRead, 387 pdmR0DevHlp_PCIPhysWrite, 333 388 pdmR0DevHlp_PCISetIrq, 334 389 pdmR0DevHlp_ISASetIrq,
Note:
See TracChangeset
for help on using the changeset viewer.