VirtualBox

Changeset 64391 in vbox


Ignore:
Timestamp:
Oct 24, 2016 2:23:16 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111499
Message:

PDMPCIDEV: s/devfn/uDevFn/ everywhere, removing the legacy alias.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmpcidev.h

    r64390 r64391  
    149149     * @{
    150150     */
    151     union
    152     {
    153         /** PCI device number [11:3] and function [2:0] on the pci bus.
    154          * @sa VBOX_PCI_DEVFN_MAKE, VBOX_PCI_DEVFN_FUN_MASK, VBOX_PCI_DEVFN_DEV_SHIFT */
    155         uint32_t            uDevFn;
    156 #ifndef PDMPCIDEVICE_NO_DEPRECATED
    157         /** @deprecated Use uDevFn! */
    158         int32_t             devfn;
    159 #endif
    160     };
     151    /** PCI device number [11:3] and function [2:0] on the pci bus.
     152     * @sa VBOX_PCI_DEVFN_MAKE, VBOX_PCI_DEVFN_FUN_MASK, VBOX_PCI_DEVFN_DEV_SHIFT */
     153    uint32_t                uDevFn;
    161154    uint32_t                Alignment0; /**< Alignment. */
    162155
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r64390 r64391  
    305305                }
    306306            }
    307             //LogRel(("PCI: config dev %u/%u BAR%i uOld=%#018llx uNew=%#018llx size=%llu\n", d->devfn >> 3, d->devfn & 7, i, r->addr, new_addr, r->size));
     307            //LogRel(("PCI: config dev %u/%u BAR%i uOld=%#018llx uNew=%#018llx size=%llu\n", d->uDevFn >> 3, d->uDevFn & 7, i, r->addr, new_addr, r->size));
    308308            /* now do the real mapping */
    309309            if (new_addr != r->addr) {
     
    665665 * @param   iLevel          IRQ level.
    666666 * @param   uTagSrc         The IRQ tag and source ID (for tracing).
    667  * @remark  uDevFn and pPciDev->devfn are not the same if the device is behind a bridge.
    668  *          In that case uDevFn will be the slot of the bridge which is needed to calculate the
    669  *          PIRQ value.
     667 * @remark  uDevFn and pPciDev->uDevFn are not the same if the device is behind
     668 *          a bridge. In that case uDevFn will be the slot of the bridge which
     669 *          is needed to calculate the PIRQ value.
    670670 */
    671671static void pciSetIrqInternal(PPCIGLOBALS pGlobals, uint8_t uDevFn, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc)
     
    763763PDMBOTHCBDECL(void) pciSetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc)
    764764{
    765     pciSetIrqInternal(PDMINS_2_DATA(pDevIns, PPCIGLOBALS), pPciDev->devfn, pPciDev, iIrq, iLevel, uTagSrc);
     765    pciSetIrqInternal(PDMINS_2_DATA(pDevIns, PPCIGLOBALS), pPciDev->uDevFn, pPciDev, iIrq, iLevel, uTagSrc);
    766766}
    767767
     
    17491749        elcr[irq >> 3] |= (1 << (irq & 7));
    17501750        /* Activate irq remapping in PIIX3. */
    1751         pci_config_writeb(pGlobals, 0, pGlobals->PIIX3State.dev.devfn, 0x60 + i, irq);
     1751        pci_config_writeb(pGlobals, 0, pGlobals->PIIX3State.dev.uDevFn, 0x60 + i, irq);
    17521752    }
    17531753
     
    17891789    NOREF(pszArgs);
    17901790
    1791     uint16_t router = pGlobals->PIIX3State.dev.devfn;
     1791    uint16_t router = pGlobals->PIIX3State.dev.uDevFn;
    17921792    pHlp->pfnPrintf(pHlp, "PCI interrupt router at: %02X:%02X:%X\n",
    17931793                    router >> 8, (router >> 3) & 0x1f, router & 0x7);
     
    22322232    do
    22332233    {
    2234         uDevFnBridge  = pBus->PciDev.devfn;
    2235         iIrqPinBridge = ((pPciDevBus->devfn >> 3) + iIrqPinBridge) & 3;
     2234        uDevFnBridge  = pBus->PciDev.uDevFn;
     2235        iIrqPinBridge = ((pPciDevBus->uDevFn >> 3) + iIrqPinBridge) & 3;
    22362236
    22372237        /* Get the parent. */
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r64390 r64391  
    208208{
    209209    LogFlowFunc(("invoked by %p/%d: iIrq=%d iLevel=%d uTagSrc=%#x\n", pDevIns, pDevIns->iInstance, iIrq, iLevel, uTagSrc));
    210     ich9pciSetIrqInternal(PDMINS_2_DATA(pDevIns, PICH9PCIGLOBALS), pPciDev->devfn, pPciDev, iIrq, iLevel, uTagSrc);
     210    ich9pciSetIrqInternal(PDMINS_2_DATA(pDevIns, PICH9PCIGLOBALS), pPciDev->uDevFn, pPciDev, iIrq, iLevel, uTagSrc);
    211211}
    212212
     
    228228    do
    229229    {
    230         uDevFnBridge  = pBus->aPciDev.devfn;
    231         iIrqPinBridge = ((pPciDevBus->devfn >> 3) + iIrqPinBridge) & 3;
     230        uDevFnBridge  = pBus->aPciDev.uDevFn;
     231        iIrqPinBridge = ((pPciDevBus->uDevFn >> 3) + iIrqPinBridge) & 3;
    232232
    233233        /* Get the parent. */
     
    938938                uNew = INVALID_PCI_ADDRESS;
    939939        }
    940         LogRel2(("PCI: config dev %u/%u BAR%i uOld=%#018llx uNew=%#018llx size=%llu\n", pDev->devfn >> 3, pDev->devfn & 7, iRegion, pRegion->addr, uNew, pRegion->size));
     940        LogRel2(("PCI: config dev %u/%u BAR%i uOld=%#018llx uNew=%#018llx size=%llu\n", pDev->uDevFn >> 3, pDev->uDevFn & 7, iRegion, pRegion->addr, uNew, pRegion->size));
    941941        /* now do the real mapping */
    942942        if (uNew != pRegion->addr)
     
    18781878            {
    18791879                /* Get the pin the device would assert on the bridge. */
    1880                 iPin = ((pBus->aPciDev.devfn >> 3) + iPin) & 3;
     1880                iPin = ((pBus->aPciDev.uDevFn >> 3) + iPin) & 3;
    18811881                pBus = pBus->aPciDev.Int.s.pBusR3;
    18821882            };
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r64387 r64391  
    62036203    if (RT_FAILURE(rc))
    62046204        return rc;
    6205     /*AssertMsg(pThis->Dev.devfn == 16 || iInstance != 0, ("pThis->Dev.devfn=%d\n", pThis->Dev.devfn));*/
    6206     if (pThis->Dev.devfn != 16 && iInstance == 0)
    6207         Log(("!!WARNING!!: pThis->dev.devfn=%d (ignore if testcase or not started by Main)\n", pThis->Dev.devfn));
     6205    /*AssertMsg(pThis->Dev.uDevFn == 16 || iInstance != 0, ("pThis->Dev.uDevFn=%d\n", pThis->Dev.uDevFn));*/
     6206    if (pThis->Dev.uDevFn != 16 && iInstance == 0)
     6207        Log(("!!WARNING!!: pThis->dev.uDevFn=%d (ignore if testcase or not started by Main)\n", pThis->Dev.uDevFn));
    62086208
    62096209#ifdef VBOX_WITH_VMSVGA
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r64387 r64391  
    36793679    pPages->IOUnitPage2.u.fields.aAdapterOrder[0].fAdapterEmbedded = true;
    36803680    pPages->IOUnitPage2.u.fields.aAdapterOrder[0].u8PCIBusNumber = 0;
    3681     pPages->IOUnitPage2.u.fields.aAdapterOrder[0].u8PCIDevFn     = pThis->PciDev.devfn;
     3681    pPages->IOUnitPage2.u.fields.aAdapterOrder[0].u8PCIDevFn     = pThis->PciDev.uDevFn;
    36823682
    36833683    /* I/O Unit page 3. */
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r64387 r64391  
    41514151    if (RT_FAILURE(rc))
    41524152        return rc;
    4153     if (pThis->PciDev.devfn != 32 || iInstance != 0)
    4154         Log(("!!WARNING!!: pThis->PciDev.devfn=%d (ignore if testcase or no started by Main)\n", pThis->PciDev.devfn));
     4153    if (pThis->PciDev.uDevFn != 32 || iInstance != 0)
     4154        Log(("!!WARNING!!: pThis->PciDev.uDevFn=%d (ignore if testcase or no started by Main)\n", pThis->PciDev.uDevFn));
    41554155    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 0x20, PCI_ADDRESS_SPACE_IO, vmmdevIOPortRegionMap);
    41564156    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r64390 r64391  
    151151    GEN_CHECK_SIZE(PDMPCIDEVICEINT);
    152152    GEN_CHECK_SIZE(PCIIOREGION);
    153     GEN_CHECK_OFF(PDMPCIDEV, config);
    154     GEN_CHECK_OFF(PDMPCIDEV, devfn);
    155     GEN_CHECK_OFF(PDMPCIDEV, name);
     153    GEN_CHECK_OFF(PDMPCIDEV, abConfig);
     154    GEN_CHECK_OFF(PDMPCIDEV, uDevFn);
     155    GEN_CHECK_OFF(PDMPCIDEV, pszNameR3);
    156156    GEN_CHECK_OFF(PDMPCIDEV, pvReserved);
    157157    GEN_CHECK_OFF(PDMPCIDEV, Int);
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