Changeset 32820 in vbox for trunk/src/VBox/VMM/PDMDevHlp.cpp
- Timestamp:
- Sep 29, 2010 4:25:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMDevHlp.cpp
r32190 r32820 1293 1293 1294 1294 1295 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIRegisterMsi} */ 1296 static DECLCALLBACK(int) pdmR3DevHlp_PCIRegisterMsi(PPDMDEVINS pDevIns, PPDMMSIREG pMsiReg) 1297 { 1298 PDMDEV_ASSERT_DEVINS(pDevIns); 1299 LogFlow(("pdmR3DevHlp_PCIRegisterMsi: caller='%s'/%d: %d vectors\n", pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cVectors)); 1300 int rc = VINF_SUCCESS; 1301 1302 /* 1303 * Must have a PCI device registered! 1304 */ 1305 PPCIDEVICE pPciDev = pDevIns->Internal.s.pPciDeviceR3; 1306 if (pPciDev) 1307 { 1308 PPDMPCIBUS pBus = pDevIns->Internal.s.pPciBusR3; /** @todo the bus should be associated with the PCI device not the PDM device. */ 1309 Assert(pBus); 1310 1311 PVM pVM = pDevIns->Internal.s.pVMR3; 1312 pdmLock(pVM); 1313 if (!pBus->pfnRegisterMsiR3) 1314 rc = VERR_NOT_IMPLEMENTED; 1315 else 1316 rc = pBus->pfnRegisterMsiR3(pBus->pDevInsR3, pPciDev, pMsiReg); 1317 pdmUnlock(pVM); 1318 } 1319 else 1320 AssertReleaseMsgFailed(("No PCI device registered!\n")); 1321 1322 LogFlow(("pdmR3DevHlp_PCISetIrq: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1323 return rc; 1324 } 1325 1295 1326 /** @interface_method_impl{PDMDEVHLPR3,pfnISASetIrq} */ 1296 1327 static DECLCALLBACK(void) pdmR3DevHlp_ISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel) … … 2042 2073 pPciBus->pDevInsR3 = pDevIns; 2043 2074 pPciBus->pfnRegisterR3 = pPciBusReg->pfnRegisterR3; 2075 pPciBus->pfnRegisterMsiR3 = pPciBusReg->pfnRegisterMsiR3; 2044 2076 pPciBus->pfnIORegionRegisterR3 = pPciBusReg->pfnIORegionRegisterR3; 2045 2077 pPciBus->pfnSetConfigCallbacksR3 = pPciBusReg->pfnSetConfigCallbacksR3; … … 3015 3047 pdmR3DevHlp_STAMRegisterV, 3016 3048 pdmR3DevHlp_PCIRegister, 3049 pdmR3DevHlp_PCIRegisterMsi, 3017 3050 pdmR3DevHlp_PCIIORegionRegister, 3018 3051 pdmR3DevHlp_PCISetConfigCallbacks, … … 3221 3254 pdmR3DevHlp_STAMRegisterV, 3222 3255 pdmR3DevHlp_PCIRegister, 3256 pdmR3DevHlp_PCIRegisterMsi, 3223 3257 pdmR3DevHlp_PCIIORegionRegister, 3224 3258 pdmR3DevHlp_PCISetConfigCallbacks,
Note:
See TracChangeset
for help on using the changeset viewer.