VirtualBox

Changeset 51485 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 2, 2014 11:19:19 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94089
Message:

ICH9: Reset more, improved debug info output.

File:
1 edited

Legend:

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

    r51377 r51485  
    23552355             * as host driver handles real devices interrupts.
    23562356             */
    2357             pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s%s: %04x-%04x%s%s",
     2357            pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s%s: %04x-%04x",
    23582358                            pBus->iBus, (iDev >> 3) & 0xff, iDev & 0x7,
    23592359                            pPciDev->name,
    23602360                            pciDevIsPassthrough(pPciDev) ? " (PASSTHROUGH)" : "",
    2361                             ich9pciGetWord(pPciDev, VBOX_PCI_VENDOR_ID), ich9pciGetWord(pPciDev, VBOX_PCI_DEVICE_ID),
    2362                             pciDevIsMsiCapable(pPciDev)  ? " MSI" : "",
    2363                             pciDevIsMsixCapable(pPciDev) ? " MSI-X" : ""
     2361                            ich9pciGetWord(pPciDev, VBOX_PCI_VENDOR_ID), ich9pciGetWord(pPciDev, VBOX_PCI_DEVICE_ID)
    23642362                            );
    23652363            if (ich9pciGetByte(pPciDev, VBOX_PCI_INTERRUPT_PIN) != 0)
    23662364                pHlp->pfnPrintf(pHlp, " IRQ%d", ich9pciGetByte(pPciDev, VBOX_PCI_INTERRUPT_LINE));
    2367 
    23682365            pHlp->pfnPrintf(pHlp, "\n");
     2366
     2367            if (pciDevIsMsiCapable(pPciDev) || pciDevIsMsixCapable(pPciDev))
     2368            {
     2369                printIndent(pHlp, iIndent + 2);
     2370
     2371                if (pciDevIsMsiCapable(pPciDev))
     2372                    pHlp->pfnPrintf(pHlp, "MSI:%s ", MsiIsEnabled(pPciDev) ? "on" : "off");
     2373
     2374                if (pciDevIsMsixCapable(pPciDev))
     2375                    pHlp->pfnPrintf(pHlp, "MSI-X:%s ", MsixIsEnabled(pPciDev) ? "on" : "off");
     2376
     2377                pHlp->pfnPrintf(pHlp, "\n");
     2378            }
    23692379
    23702380            uint16_t iCmd = ich9pciGetWord(pPciDev, VBOX_PCI_COMMAND);
     
    24082418            printIndent(pHlp, iIndent + 2);
    24092419            uint16_t iStatus = ich9pciGetWord(pPciDev, VBOX_PCI_STATUS);
    2410             pHlp->pfnPrintf(pHlp, "Command: %.*Rhxs, Status: %.*Rhxs\n",
    2411                             sizeof(uint16_t), &iCmd, sizeof(uint16_t), &iStatus);
     2420            pHlp->pfnPrintf(pHlp, "Command: %04X, Status: %04X\n",
     2421                            iCmd, iStatus);
    24122422            printIndent(pHlp, iIndent + 2);
    24132423            pHlp->pfnPrintf(pHlp, "Bus master: %s\n",
     
    26812691                         PCIDevGetCommand(pDev)
    26822692                         &
    2683                          ~(VBOX_PCI_COMMAND_IO |
    2684                            VBOX_PCI_COMMAND_MEMORY |
    2685                            VBOX_PCI_COMMAND_MASTER));
     2693                         ~(VBOX_PCI_COMMAND_IO | VBOX_PCI_COMMAND_MEMORY |
     2694                           VBOX_PCI_COMMAND_MASTER | VBOX_PCI_COMMAND_SPECIAL |
     2695                           VBOX_PCI_COMMAND_PARITY | VBOX_PCI_COMMAND_SERR |
     2696                           VBOX_PCI_COMMAND_FAST_BACK | VBOX_PCI_COMMAND_INTX_DISABLE));
    26862697
    26872698        /* Bridge device reset handlers processed later */
     
    26902701            PCIDevSetByte(pDev, VBOX_PCI_CACHE_LINE_SIZE, 0x0);
    26912702            PCIDevSetInterruptLine(pDev, 0x0);
     2703        }
     2704
     2705        /* Reset MSI message control. */
     2706        if (pciDevIsMsiCapable(pDev))
     2707        {
     2708            /* Extracted from MsiPciConfigWrite(). */
     2709            pDev->config[pDev->Int.s.u8MsiCapOffset + VBOX_MSI_CAP_MESSAGE_CONTROL] &= 0x8e;
     2710        }
     2711
     2712        /* Reset MSI-X message control. */
     2713        if (pciDevIsMsixCapable(pDev))
     2714        {
     2715            /* Extracted from MsixPciConfigWrite(); no side effects. */
     2716            pDev->config[pDev->Int.s.u8MsixCapOffset + VBOX_MSIX_CAP_MESSAGE_CONTROL + 1] &= 0x3f;
    26922717        }
    26932718    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette