Changeset 36028 in vbox for trunk/src/VBox
- Timestamp:
- Feb 21, 2011 9:54:29 AM (14 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxPci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
r35986 r36028 101 101 } 102 102 103 /** 104 * @copydoc RAWPCIDEVPORT:: pfnDeinit 105 */ 106 DECLHIDDEN(int) vboxPciDevDeinit(PRAWPCIDEVPORT pPort, uint32_t fFlags) 107 { 108 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 109 110 int rc = vboxPciOsDevDeinit(pThis, fFlags); 111 112 return rc; 113 } 114 115 116 DECLHIDDEN(int) vboxPciDevGetRegionInfo(PRAWPCIDEVPORT pPort, 117 int32_t iRegion, 118 RTHCPHYS *pRegionStart, 119 uint64_t *pu64RegionSize, 120 bool *pfPresent, 121 bool *pfMmio) 122 { 123 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 124 125 int rc = vboxPciOsDevGetRegionInfo(pThis, iRegion, 126 pRegionStart, pu64RegionSize, 127 pfPresent, pfMmio); 128 129 return rc; 130 } 131 132 DECLHIDDEN(int) vboxPciDevMapRegion(PRAWPCIDEVPORT pPort, 133 int32_t iRegion, 134 RTHCPHYS pRegionStart, 135 uint64_t u64RegionSize, 136 RTR0PTR *pRegionBase) 137 { 138 #if 0 139 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 140 141 int rc = vboxPciOsDevMapRegion(pThis, iRegion, pRegionStart, pu64RegionSize, pRegionBase); 142 143 return rc; 144 #else 145 return VINF_SUCCESS; 146 #endif 147 } 148 149 150 /** 151 * @copydoc RAWPCIDEVPORT:: pfnPciCfgRead 152 */ 153 DECLHIDDEN(int) vboxPciDevPciCfgRead(PRAWPCIDEVPORT pPort, uint32_t Register, PCIRAWMEMLOC *pValue) 154 { 155 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 156 157 int rc = vboxPciOsDevPciCfgRead(pThis, Register, pValue); 158 159 return rc; 160 } 161 162 /** 163 * @copydoc RAWPCIDEVPORT:: pfnPciCfgWrite 164 */ 165 DECLHIDDEN(int) vboxPciDevPciCfgWrite(PRAWPCIDEVPORT pPort, uint32_t Register, PCIRAWMEMLOC *pValue) 166 { 167 PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort); 168 169 int rc = vboxPciOsDevPciCfgWrite(pThis, Register, pValue); 170 171 return rc; 172 } 103 173 104 174 /** … … 110 180 * @param ppDevPort Where to store the pointer to our port interface. 111 181 */ 112 static int vboxPciNewInstance(PVBOXRAWPCIGLOBALS pGlobals, 113 uint32_t u32HostAddress, 182 static int vboxPciNewInstance(PVBOXRAWPCIGLOBALS pGlobals, 183 uint32_t u32HostAddress, 114 184 uint32_t fFlags, 115 185 PRAWPCIDEVPORT *ppDevPort) … … 122 192 pNew->pGlobals = pGlobals; 123 193 pNew->hSpinlock = NIL_RTSPINLOCK; 124 pNew->cRefs = 1; 194 pNew->cRefs = 1; 125 195 pNew->pNext = NULL; 126 196 pNew->HostPciAddress = u32HostAddress; 127 197 128 198 pNew->DevPort.u32Version = RAWPCIDEVPORT_VERSION; 199 129 200 pNew->DevPort.pfnRetain = vboxPciDevRetain; 130 201 pNew->DevPort.pfnRelease = vboxPciDevRelease; 131 202 pNew->DevPort.pfnInit = vboxPciDevInit; 203 pNew->DevPort.pfnDeinit = vboxPciDevDeinit; 204 pNew->DevPort.pfnGetRegionInfo = vboxPciDevGetRegionInfo; 205 pNew->DevPort.pfnMapRegion = vboxPciDevMapRegion; 206 pNew->DevPort.pfnPciCfgRead = vboxPciDevPciCfgRead; 207 pNew->DevPort.pfnPciCfgWrite = vboxPciDevPciCfgWrite; 208 132 209 pNew->DevPort.u32VersionEnd = RAWPCIDEVPORT_VERSION; 133 210 134 211 rc = RTSpinlockCreate(&pNew->hSpinlock); 135 212 … … 155 232 * @copydoc RAWPCIFACTORY::pfnCreateAndConnect 156 233 */ 157 static DECLCALLBACK(int) vboxPciFactoryCreateAndConnect(PRAWPCIFACTORY pFactory, 158 uint32_t u32HostAddress, 234 static DECLCALLBACK(int) vboxPciFactoryCreateAndConnect(PRAWPCIFACTORY pFactory, 235 uint32_t u32HostAddress, 159 236 uint32_t fFlags, 160 237 PRAWPCIDEVPORT *ppDevPort) … … 320 397 int rc = vboxPciInitGlobals(pGlobals); 321 398 if (RT_SUCCESS(rc)) 322 { 399 { 323 400 rc = vboxPciInitIdc(pGlobals); 324 401 if (RT_SUCCESS(rc)) … … 335 412 { 336 413 int rc = vboxPciDeleteIdc(pGlobals); 337 414 338 415 if (RT_SUCCESS(rc)) 339 416 vboxPciDeleteGlobals(pGlobals); -
trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
r35992 r36028 54 54 uint32_t HostPciAddress; 55 55 56 #ifdef RT_OS_LINUX 57 struct pci_dev * pPciDev; 58 #endif 59 56 60 /** The session this interface is associated with. */ 57 61 PSUPDRVSESSION pSession; 58 62 /** The SUPR0 object id. */ 59 63 void *pvObj; 60 64 61 65 /** Port, given to the outside world. */ 62 66 RAWPCIDEVPORT DevPort; … … 95 99 DECLHIDDEN(int) vboxPciOsDevInit (PVBOXRAWPCIINS pIns, uint32_t fFlags); 96 100 DECLHIDDEN(int) vboxPciOsDevDeinit(PVBOXRAWPCIINS pIns, uint32_t fFlags); 101 DECLHIDDEN(int) vboxPciOsDevGetRegionInfo(PVBOXRAWPCIINS pIns, 102 int32_t iRegion, 103 RTHCPHYS *pRegionStart, 104 uint64_t *pu64RegionSize, 105 bool *pfPresent, 106 bool *pfMmio); 107 DECLHIDDEN(int) vboxPciOsDevPciCfgWrite(PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue); 108 DECLHIDDEN(int) vboxPciOsDevPciCfgRead (PVBOXRAWPCIINS pIns, uint32_t Register, PCIRAWMEMLOC *pValue); 97 109 98 110 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.