VirtualBox

Changeset 34485 in vbox


Ignore:
Timestamp:
Nov 29, 2010 7:32:19 PM (14 years ago)
Author:
vboxsync
Message:

PCI: print interrupts and regions information about devices in 'info pci'

File:
1 edited

Legend:

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

    r34332 r34485  
    21302130        {
    21312131            printIndent(pHlp, iIndent);
    2132             pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s: %04x-%04x%s%s\n",
     2132            pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s: %04x-%04x%s%s",
    21332133                            pBus->iBus, (iDev >> 3) & 0xff, iDev & 0x7,
    21342134                            pPciDev->name,
     
    21372137                            PCIIsMsixCapable(pPciDev) ? " MSI-X" : ""
    21382138                            );
     2139            if (PCIDevGetInterruptPin(pPciDev) != 0)
     2140                pHlp->pfnPrintf(pHlp, " IRQ%d", PCIDevGetInterruptLine(pPciDev));
     2141
     2142            pHlp->pfnPrintf(pHlp, "\n");
     2143
     2144            int iCmd = PCIDevGetCommand(pPciDev);
     2145            if ((iCmd & (VBOX_PCI_COMMAND_IO | VBOX_PCI_COMMAND_MEMORY)) != 0)
     2146            {
     2147                for (int iRegion = 0; iRegion < PCI_NUM_REGIONS; iRegion++)
     2148                {
     2149                    PCIIORegion* pRegion = &pPciDev->Int.s.aIORegions[iRegion];
     2150                    int32_t  iRegionSize = pRegion->size;
     2151
     2152                    if (iRegionSize == 0)
     2153                        continue;
     2154
     2155                    uint32_t u32Addr = ich9pciConfigReadDev(pPciDev, ich9pciGetRegionReg(iRegion), 4);
     2156                    const char * szDesc =
     2157                            (pRegion->type & PCI_ADDRESS_SPACE_IO) ?
     2158                            "IO" : "MMIO";
     2159                    printIndent(pHlp, iIndent + 2);
     2160                    pHlp->pfnPrintf(pHlp, "  %s region #%d: %x..%x\n",
     2161                                    szDesc, iRegion, u32Addr, u32Addr+iRegionSize);
     2162                }
     2163            }
    21392164        }
    21402165    }
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