VirtualBox

Changeset 65320 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jan 16, 2017 12:39:57 PM (8 years ago)
Author:
vboxsync
Message:

DevPciIch9.cpp: use bus:dev.fn consistently for identifying PCI devices, and do some cache inconsistency detection when dumping the PCI bus info

File:
1 edited

Legend:

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

    r65302 r65320  
    268268    }
    269269
    270     Log2(("ich9pciDataWriteAddr: %02x:%02x:%02x reg %x(%d) %x %Rrc\n",
     270    Log2(("ich9pciDataWriteAddr: %02x:%02x.%d reg %x(%d) %x %Rrc\n",
    271271          pAddr->iBus, pAddr->iDeviceFunc >> 3, pAddr->iDeviceFunc & 0x7, pAddr->iRegister,
    272272          cb, val, rc));
     
    387387    }
    388388
    389     Log3(("ich9pciDataReadAddr: %02x:%02x:%02x reg %x(%d) gave %x %Rrc\n",
     389    Log3(("ich9pciDataReadAddr: %02x:%02x.%d reg %x(%d) gave %x %Rrc\n",
    390390          pPciAddr->iBus, pPciAddr->iDeviceFunc >> 3, pPciAddr->iDeviceFunc & 0x7, pPciAddr->iRegister,
    391391          cb, *pu32, rc));
     
    15551555static void ich9pciBiosInitBridge(PDEVPCIROOT pPciRoot, uint8_t uBus, uint8_t uDevFn)
    15561556{
    1557     Log(("BIOS init bridge: %02x::%02x.%d\n", uBus, uDevFn >> 3, uDevFn & 7));
     1557    Log(("BIOS init bridge: %02x:%02x.%d\n", uBus, uDevFn >> 3, uDevFn & 7));
    15581558
    15591559    /*
     
    21642164                        && !(   uMemBase <= UINT32_C(0xffffffff)
    21652165                             && uLast    >= UINT32_C(0xfec00000))
    2166                         && uMemBase <= UINT64_C(0xffffffff00000000) )
     2166                        && uMemBase < UINT64_C(0xffffffff00000000) )
    21672167                        uNew = uMemBase;
    21682168                }
     
    24752475     * passthrough approach), because then the abConfig array is an imprecise
    24762476     * cache needed for efficiency (so that certain reads can be done from
    2477      * R0/GC), but far from authoritative or what the guest would see. */
     2477     * R0/RC), but far from authoritative or what the guest would see. */
    24782478
    24792479    for (uint32_t iDev = 0; iDev < RT_ELEMENTS(pBus->apDevices); iDev++)
     
    24882488             * as host driver handles real devices interrupts.
    24892489             */
    2490             pHlp->pfnPrintf(pHlp, "%02x:%02x:%02x %s%s: %04x-%04x %s%s%s",
     2490            pHlp->pfnPrintf(pHlp, "%02x:%02x.%d %s%s: %04x-%04x %s%s%s",
    24912491                            pBus->iBus, (iDev >> 3) & 0xff, iDev & 0x7,
    24922492                            pPciDev->pszNameR3,
     
    25612561            uint16_t iCmd = ich9pciGetWord(pPciDev, VBOX_PCI_COMMAND);
    25622562            uint16_t iStatus = ich9pciGetWord(pPciDev, VBOX_PCI_STATUS);
    2563             pHlp->pfnPrintf(pHlp, "Command: %04X, Status: %04x\n", iCmd, iStatus);
     2563            pHlp->pfnPrintf(pHlp, "Command: %04x, Status: %04x\n", iCmd, iStatus);
    25642564            devpciR3InfoIndent(pHlp, iIndentLvl + 2);
    25652565            pHlp->pfnPrintf(pHlp, "Bus master: %s\n", iCmd & VBOX_PCI_COMMAND_MASTER ? "Yes" : "No");
     2566            if (iCmd != PDMPciDevGetCommand(pPciDev))
     2567            {
     2568                devpciR3InfoIndent(pHlp, iIndentLvl + 2);
     2569                pHlp->pfnPrintf(pHlp, "CACHE INCONSISTENCY: Command: %04x\n", PDMPciDevGetCommand(pPciDev));
     2570            }
    25662571
    25672572            if (fRegisters)
     
    25902595        {
    25912596            PDEVPCIBUS pBusSub = PDMINS_2_DATA(pBus->papBridgesR3[iBridge]->Int.s.CTX_SUFF(pDevIns), PDEVPCIBUS);
     2597            uint8_t uPrimary = ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_PRIMARY_BUS);
     2598            uint8_t uSecondary = ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_SECONDARY_BUS);
     2599            uint8_t uSubordinate = ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_SUBORDINATE_BUS);
    25922600            devpciR3InfoIndent(pHlp, iIndentLvl);
    25932601            pHlp->pfnPrintf(pHlp, "bridge topology: primary=%d secondary=%d subordinate=%d\n",
    2594                             ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_PRIMARY_BUS),
    2595                             ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_SECONDARY_BUS),
    2596                             ich9pciGetByte(&pBusSub->PciDev, VBOX_PCI_SUBORDINATE_BUS));
     2602                            uPrimary, uSecondary, uSubordinate);
     2603            if (   uPrimary != PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_PRIMARY_BUS)
     2604                || uSecondary != PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SECONDARY_BUS)
     2605                || uSubordinate != PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SUBORDINATE_BUS))
     2606            {
     2607                devpciR3InfoIndent(pHlp, iIndentLvl);
     2608                pHlp->pfnPrintf(pHlp, "CACHE INCONSISTENCY: primary=%d secondary=%d subordinate=%d\n",
     2609                                PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_PRIMARY_BUS),
     2610                                PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SECONDARY_BUS),
     2611                                PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SUBORDINATE_BUS));
     2612            }
    25972613            devpciR3InfoIndent(pHlp, iIndentLvl);
    25982614            pHlp->pfnPrintf(pHlp, "behind bridge: I/O %#06x..%#06x\n",
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