VirtualBox

Changeset 51652 in vbox for trunk/src


Ignore:
Timestamp:
Jun 18, 2014 3:35:32 PM (10 years ago)
Author:
vboxsync
Message:

DevAPIC: Dump all pending ISR/IRR bits, not just the highest.

File:
1 edited

Legend:

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

    r49548 r51652  
    18881888}
    18891889
    1890 
    1891 /**
    1892  * Print a 8-DWORD Local APIC bit map (256 bits).
     1890/**
     1891 * Print an 8-DWORD Local APIC bit map (256 bits).
    18931892 *
    18941893 * @param   pDev                The PDM device instance.
     
    18991898static void apicR3DumpVec(APICDeviceInfo *pDev, APICState *pApic, PCDBGFINFOHLP pHlp, uint32_t iStartReg)
    19001899{
    1901     for (uint32_t i = 0; i < 8; i++)
     1900    for (int i = 7; i >= 0; --i)
    19021901        pHlp->pfnPrintf(pHlp, "%08x", apicR3InfoReadReg(pDev, pApic, iStartReg + i));
     1902    pHlp->pfnPrintf(pHlp, "\n");
     1903}
     1904
     1905/**
     1906 * Print the set of pending interrupts in a 256-bit map.
     1907 *
     1908 * @param   pDev                The PDM device instance.
     1909 * @param   pApic               The Local APIC in question.
     1910 * @param   pHlp                The output helper.
     1911 * @param   iStartReg           The register to start at.
     1912 */
     1913static void apicR3DumpPending(APICDeviceInfo *pDev, APICState *pApic, PCDBGFINFOHLP pHlp, PCAPIC256BITREG pReg)
     1914{
     1915    APIC256BITREG       pending;
     1916    int                 iMax;
     1917    int                 cPending = 0;
     1918
     1919    pending = *pReg;
     1920    pHlp->pfnPrintf(pHlp, "    pending =");
     1921
     1922    while ((iMax = Apic256BitReg_FindLastSetBit(&pending, -1)) != -1)
     1923    {
     1924        pHlp->pfnPrintf(pHlp, " %02x", iMax);
     1925        Apic256BitReg_ClearBit(&pending, iMax);
     1926        ++cPending;
     1927    }
     1928    if (!cPending)
     1929        pHlp->pfnPrintf(pHlp, " none");
    19031930    pHlp->pfnPrintf(pHlp, "\n");
    19041931}
     
    19401967    pHlp->pfnPrintf(pHlp, "  ISR       : ");
    19411968    apicR3DumpVec(pDev, pApic, pHlp, 0x10);
    1942     int iMax = Apic256BitReg_FindLastSetBit(&pApic->isr, -1);
    1943     pHlp->pfnPrintf(pHlp, "    highest = %02x\n", iMax == -1 ? 0 : iMax);
     1969    apicR3DumpPending(pDev, pApic, pHlp, &pApic->isr);
    19441970    pHlp->pfnPrintf(pHlp, "  IRR       : ");
    19451971    apicR3DumpVec(pDev, pApic, pHlp, 0x20);
    1946     iMax = Apic256BitReg_FindLastSetBit(&pApic->irr, -1);
    1947     pHlp->pfnPrintf(pHlp, "    highest = %02X\n", iMax == -1 ? 0 : iMax);
     1972    apicR3DumpPending(pDev, pApic, pHlp, &pApic->irr);
    19481973}
    19491974
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