VirtualBox

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


Ignore:
Timestamp:
Jun 4, 2013 11:46:07 AM (12 years ago)
Author:
vboxsync
Message:

VMMDev: Added TestingMMIO config option as the MMIO range isn't generally needed.

Location:
trunk/src/VBox/Devices
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r46300 r46376  
    36803680                                  "GuestCoreDumpCount|"
    36813681                                  "TestingEnabled|"
     3682                                  "TestingMMIO|"
    36823683                                  "TestintXmlOutputFile"
    36833684                                  ,
     
    37383739        return PDMDEV_SET_ERROR(pDevIns, rc,
    37393740                                N_("Configuration error: Failed querying \"TestingEnabled\" as a boolean"));
     3741    rc = CFGMR3QueryBoolDef(pCfg, "TestingMMIO", &pThis->fTestingMMIO, false);
     3742    if (RT_FAILURE(rc))
     3743        return PDMDEV_SET_ERROR(pDevIns, rc,
     3744                                N_("Configuration error: Failed querying \"TestingMMIO\" as a boolean"));
    37403745    rc = CFGMR3QueryStringAllocDef(pCfg, "TestintXmlOutputFile", &pThis->pszTestingXmlOutput, NULL);
    37413746    if (RT_FAILURE(rc))
    37423747        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed querying \"TestintXmlOutputFile\" as a string"));
     3748
    37433749    /** @todo image-to-load-filename? */
    37443750#endif
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r46300 r46376  
    316316    /** Set if testing is enabled. */
    317317    bool                fTestingEnabled;
    318     /** Alignment padding. */
    319     bool                afPadding9[HC_ARCH_BITS == 32 ? 2 : 6];
     318    /** Set if testing the MMIO testing range is enabled. */
     319    bool                fTestingMMIO;
     320    /** Alignment padding. */
     321    bool                afPadding9[HC_ARCH_BITS == 32 ? 1 : 5];
    320322#ifndef VBOX_WITHOUT_TESTING_FEATURES
    321323    /** The high timestamp value. */
  • trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp

    r46334 r46376  
    495495{
    496496    VMMDevState *pThis = PDMINS_2_DATA(pDevIns, VMMDevState *);
     497    int          rc;
     498
    497499    if (!pThis->fTestingEnabled)
    498500        return VINF_SUCCESS;
    499501
    500     /*
    501      * Register a chunk of MMIO memory that we'll use for various
    502      * tests interfaces.
    503      */
    504     int rc = PDMDevHlpMMIORegister(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NULL /*pvUser*/,
     502    if (pThis->fTestingMMIO)
     503    {
     504        /*
     505         * Register a chunk of MMIO memory that we'll use for various
     506         * tests interfaces.  Optional, needs to be explicitly enabled.
     507         */
     508        rc = PDMDevHlpMMIORegister(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NULL /*pvUser*/,
    505509                                   IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU,
    506510                                   vmmdevTestingMmioWrite, vmmdevTestingMmioRead, "VMMDev Testing");
    507     AssertRCReturn(rc, rc);
    508     if (pThis->fRZEnabled)
    509     {
    510         rc = PDMDevHlpMMIORegisterR0(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NIL_RTR0PTR /*pvUser*/,
    511                                      "vmmdevTestingMmioWrite", "vmmdevTestingMmioRead");
    512511        AssertRCReturn(rc, rc);
    513         rc = PDMDevHlpMMIORegisterRC(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NIL_RTRCPTR /*pvUser*/,
    514                                      "vmmdevTestingMmioWrite", "vmmdevTestingMmioRead");
    515         AssertRCReturn(rc, rc);
     512        if (pThis->fRZEnabled)
     513        {
     514            rc = PDMDevHlpMMIORegisterR0(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NIL_RTR0PTR /*pvUser*/,
     515                                         "vmmdevTestingMmioWrite", "vmmdevTestingMmioRead");
     516            AssertRCReturn(rc, rc);
     517            rc = PDMDevHlpMMIORegisterRC(pDevIns, VMMDEV_TESTING_MMIO_BASE, VMMDEV_TESTING_MMIO_SIZE, NIL_RTRCPTR /*pvUser*/,
     518                                         "vmmdevTestingMmioWrite", "vmmdevTestingMmioRead");
     519            AssertRCReturn(rc, rc);
     520        }
    516521    }
    517522
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r46272 r46376  
    14811481    GEN_CHECK_OFF(VMMDEV, fRZEnabled);
    14821482    GEN_CHECK_OFF(VMMDEV, fTestingEnabled);
     1483    GEN_CHECK_OFF(VMMDEV, fTestingMMIO);
    14831484    GEN_CHECK_OFF(VMMDEV, u32TestingHighTimestamp);
    14841485    GEN_CHECK_OFF(VMMDEV, u32TestingCmd);
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