VirtualBox

Changeset 107957 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jan 28, 2025 8:38:40 AM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167204
Message:

VMM/GIC: bugref:10404 Some register renaming, minor bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/GICR3.cpp

    r107929 r107957  
    5050*   Defined Constants And Macros                                                                                                 *
    5151*********************************************************************************************************************************/
    52 /** Some ancient version... */
     52/** GIC saved state version. */
    5353#define GIC_SAVED_STATE_VERSION                     1
    5454
     
    396396     * Validate GIC settings.
    397397     */
    398     PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DistributorMmioBase|RedistributorMmioBase|ItsMmioBase|ItLinesNumber", "");
     398    PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DistributorMmioBase|RedistributorMmioBase|ItsMmioBase"
     399                                           "|ArchRev"
     400                                           "|ArchExtNmi"
     401                                           "|ItLinesNumber", "");
    399402
    400403#if 0
     
    407410    int rc;
    408411#endif
     412
     413    /** @devcfgm{gic, ArchRev, uint8_t, 3}
     414     * Configures the GIC architecture revision (GICD_PIDR2.ArchRev and
     415     * GICR_PIDR2.ArchRev).
     416     *
     417     * Currently we only support GICv3. */
     418    rc = pHlp->pfnCFGMQueryU8Def(pCfg, "ArchRev", &pGicDev->uArchRev, 3);
     419    AssertLogRelRCReturn(rc, rc);
     420    if (pGicDev->uArchRev == 3)
     421    { /* likely */ }
     422    else
     423        return PDMDevHlpVMSetError(pDevIns, VERR_INVALID_PARAMETER, RT_SRC_POS,
     424                                   N_("Configuration error: \"ArchRev\" %u is not supported"), pGicDev->uArchRev);
     425
     426    /** @devcfgm{gic, ArchExtNmi, bool, false}
     427     * Configures whether NMIs are supported (GICD_TYPER.NMI). */
     428    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "ArchExtNmi", &pGicDev->fNmi, false);
     429    AssertLogRelRCReturn(rc, rc);
     430    if (   !pGicDev->fNmi
     431        || pGicDev->uArchRev >= 3)
     432    { /* likely */ }
     433    else
     434        return PDMDevHlpVMSetError(pDevIns, VERR_INVALID_PARAMETER, RT_SRC_POS,
     435                                   N_("Configuration error: \"ArchExtNmi\" requires architecture revision v3 or newer"));
    409436
    410437    /** @devcfgm{gic, ItLinesNumber, uint16_t, 1}
     
    413440     * For the INTID range 32-1023, configures the maximum SPI supported. Valid values
    414441     * are [1, 31] which equates to interrupt IDs [63, 1023]. A value of 0 indicates no
    415      * SPIs are supported, we do not allow configuring this value as it's expected most
     442     * SPIs are supported. We do not allow configuring this value as it's expected most
    416443     * guests would assume support for SPIs. */
    417444    rc = pHlp->pfnCFGMQueryU16Def(pCfg, "ItLinesNumber", &pGicDev->uItLinesNumber, 1 /* 63 interrupt IDs */);
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