Changeset 5637 in vbox
- Timestamp:
- Nov 7, 2007 3:36:22 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25967
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r5628 r5637 67 67 { 68 68 LogFlowFuncEnter(); 69 /* *Note: hardcoded assumption about number of slots; see rom bios */70 bool faPciDeviceNo[15] = {false};69 /* Note: hardcoded assumption about number of slots; see rom bios */ 70 bool afPciDeviceNo[15] = {false}; 71 71 72 72 #if defined(RT_OS_WINDOWS) … … 347 347 rc = CFGMR3InsertInteger(pCfg, "IOAPIC", fIOAPIC); RC_CHECK(); 348 348 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 7); RC_CHECK(); 349 Assert(! faPciDeviceNo[7]);350 faPciDeviceNo[7] = true;349 Assert(!afPciDeviceNo[7]); 350 afPciDeviceNo[7] = true; 351 351 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 352 352 … … 525 525 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 526 526 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 2); RC_CHECK(); 527 Assert(! faPciDeviceNo[2]);528 faPciDeviceNo[2] = true;527 Assert(!afPciDeviceNo[2]); 528 afPciDeviceNo[2] = true; 529 529 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 530 530 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); … … 576 576 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 577 577 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 1); RC_CHECK(); 578 Assert(! faPciDeviceNo[1]);579 faPciDeviceNo[1] = true;578 Assert(!afPciDeviceNo[1]); 579 afPciDeviceNo[1] = true; 580 580 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 1); RC_CHECK(); 581 581 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); … … 846 846 rc = CFGMR3InsertNode(pDev, szInstance, &pInst); RC_CHECK(); 847 847 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 848 /* the first network card gets the PCI ID 3, the followings starting from 8 */ 849 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", !ulInstance ? 3 : ulInstance - 1 + 8); RC_CHECK(); 850 Assert(!faPciDeviceNo[!ulInstance ? 3 : ulInstance - 1 + 8]); 851 faPciDeviceNo[!ulInstance ? 3 : ulInstance - 1 + 8] = true; 848 /* the first network card gets the PCI ID 3, the next 3 gets 8..10. */ 849 const unsigned iPciDeviceNo = !ulInstance ? 3 : ulInstance - 1 + 8; 850 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", iPciDeviceNo); RC_CHECK(); 851 Assert(!afPciDeviceNo[iPciDeviceNo]); 852 afPciDeviceNo[iPciDeviceNo] = true; 852 853 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 853 854 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); … … 1213 1214 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1214 1215 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 4); RC_CHECK(); 1215 Assert(! faPciDeviceNo[4]);1216 faPciDeviceNo[4] = true;1216 Assert(!afPciDeviceNo[4]); 1217 afPciDeviceNo[4] = true; 1217 1218 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1218 1219 … … 1264 1265 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1265 1266 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 5); RC_CHECK(); 1266 Assert(! faPciDeviceNo[5]);1267 faPciDeviceNo[5] = true;1267 Assert(!afPciDeviceNo[5]); 1268 afPciDeviceNo[5] = true; 1268 1269 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1269 1270 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); … … 1336 1337 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1337 1338 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 6); RC_CHECK(); 1338 Assert(! faPciDeviceNo[6]);1339 faPciDeviceNo[6] = true;1339 Assert(!afPciDeviceNo[6]); 1340 afPciDeviceNo[6] = true; 1340 1341 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1341 1342 … … 1363 1364 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1364 1365 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 11); RC_CHECK(); 1365 Assert(! faPciDeviceNo[11]);1366 faPciDeviceNo[11] = true;1366 Assert(!afPciDeviceNo[11]); 1367 afPciDeviceNo[11] = true; 1367 1368 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1368 1369
Note:
See TracChangeset
for help on using the changeset viewer.