VirtualBox

Changeset 33910 in vbox


Ignore:
Timestamp:
Nov 9, 2010 3:45:44 PM (14 years ago)
Author:
vboxsync
Message:

Main, PXE: pass bus number too

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r32720 r33910  
    10991099    {
    11001100        PCFGMNODE   pCfgNetBootDevice;
     1101        uint8_t     u8PciBus;
    11011102        uint8_t     u8PciDev;
    11021103        uint8_t     u8PciFn;
     
    11091110            szIndex[0] = '0' + i;
    11101111            pCfgNetBootDevice = CFGMR3GetChild(pCfgNetBoot, szIndex);
     1112
     1113            rc = CFGMR3QueryU8(pCfgNetBootDevice, "PCIBusNo", &u8PciBus);
     1114            if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
     1115            {
     1116                /* Do nothing and stop iterating. */
     1117                rc = VINF_SUCCESS;
     1118                break;
     1119            }
     1120            else if (RT_FAILURE(rc))
     1121                return PDMDEV_SET_ERROR(pDevIns, rc,
     1122                                        N_("Configuration error: Querying \"Netboot/x/PCIBusNo\" as integer failed"));
    11111123            rc = CFGMR3QueryU8(pCfgNetBootDevice, "PCIDeviceNo", &u8PciDev);
    11121124            if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
     
    11291141                return PDMDEV_SET_ERROR(pDevIns, rc,
    11301142                                        N_("Configuration error: Querying \"Netboot/x/PCIFunctionNo\" as integer failed"));
     1143            /** @todo: encode bus number too */
    11311144            u16BusDevFn = ((u8PciDev & 0x1F) << 3) | (u8PciFn & 0x7);
    11321145            pThis->au16NetBootDev[i] = u16BusDevFn;
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r33907 r33910  
    209209struct BootNic
    210210{
    211     ULONG       mInstance;
    212     unsigned    mPciDev;
    213     unsigned    mPciFn;
    214     ULONG       mBootPrio;
     211    ULONG          mInstance;
     212    PciBusAddress  mPciAddress;
     213
     214    ULONG          mBootPrio;
    215215    bool operator < (const BootNic &rhs) const
    216216    {
     
    15831583            BootNic     nic;
    15841584
    1585             nic.mInstance = ulInstance;
    1586             nic.mPciDev   = iPciDeviceNo;
    1587             nic.mPciFn    = 0;
     1585            nic.mInstance    = ulInstance;
     1586            /* Could be updated by reference, if auto assigned */
     1587            nic.mPciAddress  = PciAddr;
    15881588
    15891589            hrc = networkAdapter->COMGETTER(BootPriority)(&nic.mBootPrio);                  H();
     
    16941694                InsertConfigNode(pNetBootCfg, achBootIdx, &pNetBtDevCfg);
    16951695                InsertConfigInteger(pNetBtDevCfg, "NIC", it->mInstance);
    1696                 InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo", it->mPciDev);
    1697                 InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mPciFn);
     1696                InsertConfigInteger(pNetBtDevCfg, "PCIBusNo",      it->mPciAddress.iBus);
     1697                InsertConfigInteger(pNetBtDevCfg, "PCIDeviceNo",   it->mPciAddress.iDevice);
     1698                InsertConfigInteger(pNetBtDevCfg, "PCIFunctionNo", it->mPciAddress.iFn);
    16981699            }
    16991700        }
     
    22772278            {
    22782279                BootNic aNic = llBootNics.front();
    2279                 uint32_t u32NicPciAddr = (aNic.mPciDev << 16) | aNic.mPciFn;
     2280                uint32_t u32NicPciAddr = (aNic.mPciAddress.iDevice << 16) | aNic.mPciAddress.iFn;
    22802281                InsertConfigInteger(pCfg, "NicPciAddress",    u32NicPciAddr);
    22812282            }
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