VirtualBox

Changeset 32471 in vbox for trunk/src/VBox/Devices/Bus


Ignore:
Timestamp:
Sep 14, 2010 10:26:07 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65845
Message:

Devices: refactoring, further PCI work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r32379 r32471  
    12681268    },
    12691269    {
    1270         "lan",      25, 0
     1270        "lan",      25, 0 /* LAN controller */
    12711271    },
    12721272    {
     
    14141414    return VINF_SUCCESS;
    14151415}
     1416
     1417
     1418/**
     1419 * Info handler, device version.
     1420 *
     1421 * @param   pDevIns     Device instance which registered the info.
     1422 * @param   pHlp        Callback functions for doing output.
     1423 * @param   pszArgs     Argument string. Optional and specific to the handler.
     1424 */
     1425static DECLCALLBACK(void) ich9pciInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     1426{
     1427    PPCIBUS pBus = DEVINS_2_PCIBUS(pDevIns);
     1428    uint32_t iBus = 0, iDev;
     1429
     1430
     1431    for (iDev = 0; iDev < RT_ELEMENTS(pBus->apDevices); iDev++)
     1432    {
     1433        PPCIDEVICE pPciDev = pBus->apDevices[iDev];
     1434        if (pPciDev != NULL)
     1435            pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s: %x-%x\n",
     1436                            iBus, (iDev >> 3) & 0xff, iDev & 0x7,
     1437                            pPciDev->name,
     1438                            PCIDevGetVendorId(pPciDev), PCIDevGetDeviceId(pPciDev)
     1439                            );
     1440    }
     1441}
     1442
    14161443
    14171444static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns,
     
    15211548    /** @todo: other chipset devices shall be registered too */
    15221549    /** @todo: what to with bridges? */
     1550
     1551    PDMDevHlpDBGFInfoRegister(pDevIns, "pci", "Display PCI bus status. (no arguments)", ich9pciInfo);
    15231552
    15241553    return VINF_SUCCESS;
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