Changeset 64391 in vbox
- Timestamp:
- Oct 24, 2016 2:23:16 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 111499
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmpcidev.h
r64390 r64391 149 149 * @{ 150 150 */ 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; 161 154 uint32_t Alignment0; /**< Alignment. */ 162 155 -
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r64390 r64391 305 305 } 306 306 } 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)); 308 308 /* now do the real mapping */ 309 309 if (new_addr != r->addr) { … … 665 665 * @param iLevel IRQ level. 666 666 * @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 the669 * 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. 670 670 */ 671 671 static void pciSetIrqInternal(PPCIGLOBALS pGlobals, uint8_t uDevFn, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc) … … 763 763 PDMBOTHCBDECL(void) pciSetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc) 764 764 { 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); 766 766 } 767 767 … … 1749 1749 elcr[irq >> 3] |= (1 << (irq & 7)); 1750 1750 /* 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); 1752 1752 } 1753 1753 … … 1789 1789 NOREF(pszArgs); 1790 1790 1791 uint16_t router = pGlobals->PIIX3State.dev. devfn;1791 uint16_t router = pGlobals->PIIX3State.dev.uDevFn; 1792 1792 pHlp->pfnPrintf(pHlp, "PCI interrupt router at: %02X:%02X:%X\n", 1793 1793 router >> 8, (router >> 3) & 0x1f, router & 0x7); … … 2232 2232 do 2233 2233 { 2234 uDevFnBridge = pBus->PciDev. devfn;2235 iIrqPinBridge = ((pPciDevBus-> devfn >> 3) + iIrqPinBridge) & 3;2234 uDevFnBridge = pBus->PciDev.uDevFn; 2235 iIrqPinBridge = ((pPciDevBus->uDevFn >> 3) + iIrqPinBridge) & 3; 2236 2236 2237 2237 /* Get the parent. */ -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r64390 r64391 208 208 { 209 209 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); 211 211 } 212 212 … … 228 228 do 229 229 { 230 uDevFnBridge = pBus->aPciDev. devfn;231 iIrqPinBridge = ((pPciDevBus-> devfn >> 3) + iIrqPinBridge) & 3;230 uDevFnBridge = pBus->aPciDev.uDevFn; 231 iIrqPinBridge = ((pPciDevBus->uDevFn >> 3) + iIrqPinBridge) & 3; 232 232 233 233 /* Get the parent. */ … … 938 938 uNew = INVALID_PCI_ADDRESS; 939 939 } 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)); 941 941 /* now do the real mapping */ 942 942 if (uNew != pRegion->addr) … … 1878 1878 { 1879 1879 /* 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; 1881 1881 pBus = pBus->aPciDev.Int.s.pBusR3; 1882 1882 }; -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r64387 r64391 6203 6203 if (RT_FAILURE(rc)) 6204 6204 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)); 6208 6208 6209 6209 #ifdef VBOX_WITH_VMSVGA -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r64387 r64391 3679 3679 pPages->IOUnitPage2.u.fields.aAdapterOrder[0].fAdapterEmbedded = true; 3680 3680 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; 3682 3682 3683 3683 /* I/O Unit page 3. */ -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r64387 r64391 4151 4151 if (RT_FAILURE(rc)) 4152 4152 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)); 4155 4155 rc = PDMDevHlpPCIIORegionRegister(pDevIns, 0, 0x20, PCI_ADDRESS_SPACE_IO, vmmdevIOPortRegionMap); 4156 4156 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
r64390 r64391 151 151 GEN_CHECK_SIZE(PDMPCIDEVICEINT); 152 152 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); 156 156 GEN_CHECK_OFF(PDMPCIDEV, pvReserved); 157 157 GEN_CHECK_OFF(PDMPCIDEV, Int);
Note:
See TracChangeset
for help on using the changeset viewer.