VirtualBox

Changeset 81567 in vbox


Ignore:
Timestamp:
Oct 29, 2019 10:53:14 AM (5 years ago)
Author:
vboxsync
Message:

DevE1000: Eliminated e1kR3Map(). bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r81514 r81567  
    10571057    PDMCRITSECT             csTx;
    10581058#endif /* E1K_WITH_TX_CS */
    1059     /** Base address of memory-mapped registers. */
    1060     RTGCPHYS    addrMMReg;
    10611059    /** MAC address obtained from the configuration. */
    10621060    RTMAC       macConfigured;
    1063     /** Base port of I/O space region. */
    1064     RTIOPORT    IOPortBase;
     1061    uint16_t    u16Padding0;
    10651062    /** EMT: Last time the interrupt was acknowledged.  */
    10661063    uint64_t    u64AckedAt;
     
    63536350}
    63546351
    6355 /**
    6356  * @callback_method_impl{FNPCIIOREGIONMAP}
    6357  *
    6358  * @todo Can remove this one later, it's realy just here for taking down
    6359  *       addresses for e1kInfo(), an alignment assertion and sentimentality.
    6360  */
    6361 static DECLCALLBACK(int) e1kR3Map(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion,
    6362                                   RTGCPHYS GCPhysAddress, RTGCPHYS cb, PCIADDRESSSPACE enmType)
    6363 {
    6364     PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, PE1KSTATE);
    6365     E1kLog(("%s e1kR3Map: iRegion=%u GCPhysAddress=%RGp\n", pThis->szPrf, iRegion, GCPhysAddress));
    6366     RT_NOREF(pPciDev, iRegion, cb);
    6367     Assert(pPciDev == pDevIns->apPciDevs[0]);
    6368 
    6369     switch (enmType)
    6370     {
    6371         case PCI_ADDRESS_SPACE_IO:
    6372             pThis->IOPortBase = (RTIOPORT)GCPhysAddress;
    6373             break;
    6374 
    6375         case PCI_ADDRESS_SPACE_MEM:
    6376             pThis->addrMMReg = GCPhysAddress;
    6377             Assert(!(GCPhysAddress & 7) || GCPhysAddress == NIL_RTGCPHYS);
    6378             break;
    6379 
    6380         default:
    6381             /* We should never get here */
    6382             AssertMsgFailedReturn(("Invalid PCI address space param in map callback"), VERR_INTERNAL_ERROR);
    6383     }
    6384     return VINF_SUCCESS;
    6385 }
    6386 
    63876352
    63886353/* -=-=-=-=- PDMINETWORKDOWN -=-=-=-=- */
     
    72967261     * Show info.
    72977262     */
    7298     pHlp->pfnPrintf(pHlp, "E1000 #%d: port=%RTiop mmio=%RGp mac-cfg=%RTmac %s%s%s\n",
    7299                     pDevIns->iInstance, pThis->IOPortBase, pThis->addrMMReg,
     7263    pHlp->pfnPrintf(pHlp, "E1000 #%d: port=%04x mmio=%RGp mac-cfg=%RTmac %s%s%s\n",
     7264                    pDevIns->iInstance,
     7265                    PDMDevHlpIoPortGetMappingAddress(pDevIns, pThis->hIoPorts),
     7266                    PDMDevHlpMmioGetMappingAddress(pDevIns, pThis->hMmioRegion),
    73007267                    &pThis->macConfigured, g_aChips[pThis->eChip].pcszName,
    73017268                    pDevIns->fRCEnabled ? " RC" : "", pDevIns->fR0Enabled ? " R0" : "");
     
    79007867                               e1kMMIOWrite, e1kMMIORead, NULL /*pfnFill*/, NULL /*pvUser*/, "E1000", &pThis->hMmioRegion);
    79017868    AssertRCReturn(rc, rc);
    7902     rc = PDMDevHlpPCIIORegionRegisterMmio(pDevIns, 0, E1K_MM_SIZE, PCI_ADDRESS_SPACE_MEM, pThis->hMmioRegion, e1kR3Map);
     7869    rc = PDMDevHlpPCIIORegionRegisterMmio(pDevIns, 0, E1K_MM_SIZE, PCI_ADDRESS_SPACE_MEM, pThis->hMmioRegion, NULL);
    79037870    AssertRCReturn(rc, rc);
    79047871
     
    79137880                               e1kIOPortOut, e1kIOPortIn, NULL /*pvUser*/, "E1000", s_aExtDescs, &pThis->hIoPorts);
    79147881    AssertRCReturn(rc, rc);
    7915     rc = PDMDevHlpPCIIORegionRegisterIo(pDevIns, 2, E1K_IOPORT_SIZE, pThis->hIoPorts, e1kR3Map);
     7882    rc = PDMDevHlpPCIIORegionRegisterIo(pDevIns, 2, E1K_IOPORT_SIZE, pThis->hIoPorts, NULL);
    79167883    AssertRCReturn(rc, rc);
    79177884
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