VirtualBox

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


Ignore:
Timestamp:
Dec 6, 2010 2:20:13 PM (14 years ago)
Author:
vboxsync
Message:

PCI: Added pciirq dbg info command for old chipset.

File:
1 edited

Legend:

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

    r34332 r34750  
    19621962
    19631963/**
     1964 * Info handler, device version.
     1965 *
     1966 * @param   pDevIns     Device instance which registered the info.
     1967 * @param   pHlp        Callback functions for doing output.
     1968 * @param   pszArgs     Argument string. Optional and specific to the handler.
     1969 */
     1970static DECLCALLBACK(void) pciIrqInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     1971{
     1972    PPCIGLOBALS pGlobals = PDMINS_2_DATA(pDevIns, PPCIGLOBALS);
     1973    PPCIBUS     pBus = DEVINS_2_PCIBUS(pDevIns);
     1974    uint16_t    router;
     1975    uint8_t     irq_map;
     1976    int         i;
     1977
     1978    router = pGlobals->PIIX3State.dev.devfn;
     1979    pHlp->pfnPrintf(pHlp, "PCI interrupt router at: %02X:%02X:%X\n",
     1980                    router >> 8, (router >> 3) & 0x1f, router & 0x7);
     1981
     1982    for (i = 0; i < 4; ++i)
     1983    {
     1984        irq_map = pci_config_readb(pGlobals, 0, router, 0x60 + i);
     1985        if (irq_map & 0x80)
     1986            pHlp->pfnPrintf(pHlp, "PIRQ%c disabled\n", 'A' + i);
     1987        else
     1988            pHlp->pfnPrintf(pHlp, "PIRQ%c -> IRQ%d\n", 'A' + i, irq_map & f);
     1989    }
     1990}
     1991
     1992/**
    19641993 * @copydoc FNPDMDEVRELOCATE
    19651994 */
     
    21332162    if (RT_FAILURE(rc))
    21342163        return rc;
     2164
     2165    PDMDevHlpDBGFInfoRegister(pDevIns, "pciirq", "Display PCI IRQ routing state. (no arguments)", pciIrqInfo);
    21352166
    21362167    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