Changeset 64406 in vbox
- Timestamp:
- Oct 24, 2016 7:25:03 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r64387 r64406 2344 2344 # define PDMPCIDEVREG_CFG_NEXT UINT32_MAX 2345 2345 /** Same device number as the previous PCI device registered with the PDM device. 2346 * This is handy when registering multiple PCI device functions 2347 * and the device number is left up to the PCI bus. */ 2346 * This is handy when registering multiple PCI device functions and the device 2347 * number is left up to the PCI bus. In order to facilitate on PDM device 2348 * instance for each PCI function, this searches earlier PDM device 2349 * instances as well. */ 2348 2350 # define PDMPCIDEVREG_DEV_NO_SAME_AS_PREV UINT8_C(0xfd) 2349 2351 /** Use the first unused device number (all functions must be unused). */ -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r64390 r64406 1299 1299 if (uPciDevNo == PDMPCIDEVREG_DEV_NO_SAME_AS_PREV) 1300 1300 { 1301 AssertLogRelMsgReturn(pPrevPciDev, ("'%s'/%d: Can't use PDMPCIDEVREG_DEV_NO_SAME_AS_PREV with the first PCI device!\n", 1302 pDevIns->pReg->szName, pDevIns->iInstance), 1303 VERR_WRONG_ORDER); 1304 uPciDevNo = pPrevPciDev->uDevFn >> 3; 1301 if (pPrevPciDev) 1302 uPciDevNo = pPrevPciDev->uDevFn >> 3; 1303 else 1304 { 1305 /* Look for PCI device registered with an earlier device instance so we can more 1306 easily have multiple functions spanning multiple PDM device instances. */ 1307 PPDMPCIDEV pOtherPciDev = NULL; 1308 PPDMDEVINS pPrevIns = pDevIns->Internal.s.pDevR3->pInstances; 1309 while (pPrevIns != pDevIns && pPrevIns) 1310 { 1311 pOtherPciDev = pPrevIns->Internal.s.pHeadPciDevR3; 1312 pPrevIns = pPrevIns->Internal.s.pNextR3; 1313 } 1314 Assert(pPrevIns == pDevIns); 1315 AssertLogRelMsgReturn(pOtherPciDev, 1316 ("'%s'/%d: Can't use PDMPCIDEVREG_DEV_NO_SAME_AS_PREV without a previously registered PCI device by the same or earlier PDM device instance!\n", 1317 pDevIns->pReg->szName, pDevIns->iInstance), 1318 VERR_WRONG_ORDER); 1319 1320 while (pOtherPciDev->Int.s.pNextR3) 1321 pOtherPciDev = pOtherPciDev->Int.s.pNextR3; 1322 uPciDevNo = pOtherPciDev->uDevFn >> 3; 1323 } 1305 1324 } 1306 1325 -
trunk/src/VBox/VMM/include/PDMInternal.h
r64387 r64406 142 142 PVMR3 pVMR3; 143 143 /** Associated PCI device list head (first is default). (R3 ptr) */ 144 R3PTRTYPE(PPDMPCIDEV) pHeadPciDevR3;144 R3PTRTYPE(PPDMPCIDEV) pHeadPciDevR3; 145 145 146 146 /** R0 pointer to the VM this instance was created for. */ 147 147 PVMR0 pVMR0; 148 148 /** Associated PCI device list head (first is default). (R0 ptr) */ 149 R0PTRTYPE(PPDMPCIDEV) pHeadPciDevR0;149 R0PTRTYPE(PPDMPCIDEV) pHeadPciDevR0; 150 150 151 151 /** RC pointer to the VM this instance was created for. */ 152 152 PVMRC pVMRC; 153 153 /** Associated PCI device list head (first is default). (RC ptr) */ 154 RCPTRTYPE(PPDMPCIDEV) pHeadPciDevRC;154 RCPTRTYPE(PPDMPCIDEV) pHeadPciDevRC; 155 155 156 156 /** Flags, see PDMDEVINSINT_FLAGS_XXX. */
Note:
See TracChangeset
for help on using the changeset viewer.