VirtualBox

Changeset 33918 in vbox


Ignore:
Timestamp:
Nov 9, 2010 5:11:14 PM (14 years ago)
Author:
vboxsync
Message:

Main: allow multiple AHCI controllers

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r33910 r33918  
    13411341                    InsertConfigInteger(pCfg, "PortCount", cPorts);
    13421342
    1343                     /* Needed configuration values for the bios. */
    1344                     if (pBiosCfg)
     1343                    /* Needed configuration values for the bios, only first controller. */
     1344                    if (!BusMgr->hasPciDevice("ahci", 1))
    13451345                    {
    1346                         InsertConfigString(pBiosCfg, "SataHardDiskDevice", "ahci");
     1346                        if (pBiosCfg)
     1347                        {
     1348                            InsertConfigString(pBiosCfg, "SataHardDiskDevice", "ahci");
     1349                        }
     1350                       
     1351                        for (uint32_t j = 0; j < 4; ++j)
     1352                        {
     1353                            static const char * const s_apszConfig[4] =
     1354                                    { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" };
     1355                            static const char * const s_apszBiosConfig[4] =
     1356                                    { "SataPrimaryMasterLUN", "SataPrimarySlaveLUN", "SataSecondaryMasterLUN", "SataSecondarySlaveLUN" };
     1357                           
     1358                            LONG lPortNumber = -1;
     1359                            hrc = ctrls[i]->GetIDEEmulationPort(j, &lPortNumber);               H();
     1360                            InsertConfigInteger(pCfg, s_apszConfig[j], lPortNumber);
     1361                            if (pBiosCfg)
     1362                                InsertConfigInteger(pBiosCfg, s_apszBiosConfig[j], lPortNumber);
     1363                        }
    13471364                    }
    1348 
    1349                     for (uint32_t j = 0; j < 4; ++j)
    1350                     {
    1351                         static const char * const s_apszConfig[4] =
    1352                         { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" };
    1353                         static const char * const s_apszBiosConfig[4] =
    1354                         { "SataPrimaryMasterLUN", "SataPrimarySlaveLUN", "SataSecondaryMasterLUN", "SataSecondarySlaveLUN" };
    1355 
    1356                         LONG lPortNumber = -1;
    1357                         hrc = ctrls[i]->GetIDEEmulationPort(j, &lPortNumber);               H();
    1358                         InsertConfigInteger(pCfg, s_apszConfig[j], lPortNumber);
    1359                         if (pBiosCfg)
    1360                             InsertConfigInteger(pBiosCfg, s_apszBiosConfig[j], lPortNumber);
    1361                     }
    1362 
     1365                       
    13631366                    /* Attach the status driver */
    13641367                    InsertConfigNode(pCtlInst, "LUN#999", &pLunL0);
  • trunk/src/VBox/Main/include/BusAssignmentManager.h

    r33690 r33918  
    111111    }
    112112    virtual bool findPciAddress(const char* pszDevName, int iInstance, PciBusAddress& Address);
     113    virtual bool hasPciDevice(const char* pszDevName, int iInstance)
     114    {
     115        PciBusAddress Address;
     116        return findPciAddress(pszDevName, iInstance, Address);
     117    }
    113118};
    114119
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette