Changeset 64844 in vbox
- Timestamp:
- Dec 12, 2016 8:30:09 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112238
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmdev.h
r64696 r64844 1857 1857 /** Use the next device configuration number in the sequence (max + 1). */ 1858 1858 # define PDMPCIDEVREG_CFG_NEXT UINT32_MAX 1859 /** Same device number as the previous PCI device registered with the PDM device. 1860 * This is handy when registering multiple PCI device functions and the device 1861 * number is left up to the PCI bus. In order to facilitate on PDM device 1862 * instance for each PCI function, this searches earlier PDM device 1863 * instances as well. */ 1859 /** Same device number (and bus) as the previous PCI device registered with the PDM device. 1860 * This is handy when registering multiple PCI device functions and the device number 1861 * is left up to the PCI bus. In order to facilitate on PDM device instance for each 1862 * PCI function, this searches earlier PDM device instances as well. */ 1864 1863 # define PDMPCIDEVREG_DEV_NO_SAME_AS_PREV UINT8_C(0xfd) 1865 1864 /** Use the first unused device number (all functions must be unused). */ -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r64696 r64844 1297 1297 */ 1298 1298 uint8_t const uPciDevNoRaw = uPciDevNo; 1299 uint32_t uDefPciBusNo = 0; 1299 1300 if (uPciDevNo == PDMPCIDEVREG_DEV_NO_SAME_AS_PREV) 1300 1301 { 1301 1302 if (pPrevPciDev) 1302 uPciDevNo = pPrevPciDev->uDevFn >> 3; 1303 { 1304 uPciDevNo = pPrevPciDev->uDevFn >> 3; 1305 uDefPciBusNo = pPrevPciDev->Int.s.pPdmBusR3->iBus; 1306 } 1303 1307 else 1304 1308 { … … 1320 1324 while (pOtherPciDev->Int.s.pNextR3) 1321 1325 pOtherPciDev = pOtherPciDev->Int.s.pNextR3; 1322 uPciDevNo = pOtherPciDev->uDevFn >> 3; 1326 uPciDevNo = pOtherPciDev->uDevFn >> 3; 1327 uDefPciBusNo = pOtherPciDev->Int.s.pPdmBusR3->iBus; 1323 1328 } 1324 1329 } … … 1331 1336 */ 1332 1337 /** @cfgm{/Devices/NAME/XX/[PciCfgYY/]PCIBusNo, uint8_t, 0, 7, 0} 1333 * Selects the PCI bus number of a device. 1338 * Selects the PCI bus number of a device. The default value isn't necessarily 1339 * zero if the device is registered using PDMPCIDEVREG_DEV_NO_SAME_AS_PREV, it 1340 * will then also inherit the bus number from the previously registered device. 1334 1341 */ 1335 1342 uint8_t u8Bus; 1336 int rc = CFGMR3QueryU8Def(pCfg, "PCIBusNo", &u8Bus, 0);1343 int rc = CFGMR3QueryU8Def(pCfg, "PCIBusNo", &u8Bus, (uint8_t)uDefPciBusNo); 1337 1344 AssertLogRelMsgRCReturn(rc, ("Configuration error: PCIBusNo query failed with rc=%Rrc (%s/%d)\n", 1338 1345 rc, pDevIns->pReg->szName, pDevIns->iInstance), rc);
Note:
See TracChangeset
for help on using the changeset viewer.