VirtualBox

Changeset 64115 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Sep 30, 2016 8:14:27 PM (8 years ago)
Author:
vboxsync
Message:

PDM,IOM,PGM: Morphed the MMIO2 API into a mixed MMIO2 and pre-registered MMIO API that is able to deal with really large (<= 64GB) MMIO ranges. Limited testing, so back out at first sign of trouble.

Location:
trunk/src/VBox/Devices/Network
Files:
2 edited

Legend:

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

    r63690 r64115  
    4848
    4949
    50 /* Options *******************************************************************/
     50/*********************************************************************************************************************************
     51*   Defined Constants And Macros                                                                                                 *
     52*********************************************************************************************************************************/
     53/** @name E1000 Build Options
     54 * @{ */
    5155/** @def E1K_INIT_RA0
    5256 * E1K_INIT_RA0 forces E1000 to set the first entry in Receive Address filter
     
    117121 */
    118122#define E1K_WITH_RXD_CACHE
     123/** @def E1K_WITH_PREREG_MMIO
     124 * E1K_WITH_PREREG_MMIO enables a new style MMIO registration and is
     125 * currently only done for testing the relateted PDM, IOM and PGM code. */
     126//#define E1K_WITH_PREREG_MMIO
     127/* @} */
    119128/* End of Options ************************************************************/
    120129
     
    61136122             *    byte enables.
    61146123             */
     6124#ifdef E1K_WITH_PREREG_MMIO
     6125            pThis->addrMMReg = GCPhysAddress;
     6126            if (GCPhysAddress == NIL_RTGCPHYS)
     6127                rc = VINF_SUCCESS;
     6128            else
     6129            {
     6130                Assert(!(GCPhysAddress & 7));
     6131                rc = PDMDevHlpMMIOExMap(pPciDev->pDevIns, iRegion, GCPhysAddress);
     6132            }
     6133#else
    61156134            pThis->addrMMReg = GCPhysAddress; Assert(!(GCPhysAddress & 7));
    61166135            rc = PDMDevHlpMMIORegister(pPciDev->pDevIns, GCPhysAddress, cb, NULL /*pvUser*/,
     
    61236142                rc = PDMDevHlpMMIORegisterRC(pPciDev->pDevIns, GCPhysAddress, cb, NIL_RTRCPTR /*pvUser*/,
    61246143                                             "e1kMMIOWrite", "e1kMMIORead");
     6144#endif
    61256145            break;
    61266146
     
    76417661    if (RT_FAILURE(rc))
    76427662        return rc;
     7663#ifdef E1K_WITH_PREREG_MMIO
     7664    rc = PDMDevHlpMMIOExPreRegister(pDevIns, 0, E1K_MM_SIZE, IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_ONLY_DWORD, "E1000",
     7665                                    NULL        /*pvUserR3*/, e1kMMIOWrite, e1kMMIORead, NULL /*pfnFillR3*/,
     7666                                    NIL_RTR0PTR /*pvUserR0*/, pThis->fR0Enabled ? "e1kMMIOWrite" : NULL,
     7667                                    pThis->fR0Enabled ? "e1kMMIORead" : NULL, NULL /*pszFillR0*/,
     7668                                    NIL_RTRCPTR /*pvUserRC*/, pThis->fRCEnabled ? "e1kMMIOWrite" : NULL,
     7669                                    pThis->fRCEnabled ? "e1kMMIORead" : NULL, NULL /*pszFillRC*/);
     7670    AssertLogRelRCReturn(rc, rc);
     7671#endif
    76437672    /* Map our registers to IO space (region 2, see e1kConfigurePCI) */
    76447673    rc = PDMDevHlpPCIIORegionRegister(pDevIns, 2, E1K_IOPORT_SIZE, PCI_ADDRESS_SPACE_IO, e1kMap);
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r63690 r64115  
    44184418    {
    44194419        /* drop this dummy region */
    4420         rc = PDMDevHlpMMIO2Deregister(pDevIns, 2);
     4420        rc = PDMDevHlpMMIOExDeregister(pDevIns, 2);
    44214421        pThis->fSharedRegion = false;
    44224422    }
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