- Timestamp:
- Apr 2, 2025 6:04:51 AM (13 days ago)
- svn:sync-xref-src-repo-rev:
- 168269
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GICR3.cpp
r108779 r108823 51 51 *********************************************************************************************************************************/ 52 52 /** GIC saved state version. */ 53 #define GIC_SAVED_STATE_VERSION 753 #define GIC_SAVED_STATE_VERSION 8 54 54 55 55 # define GIC_SYSREGRANGE(a_uFirst, a_uLast, a_szName) \ … … 91 91 pHlp->pfnPrintf(pHlp, "GIC:\n"); 92 92 pHlp->pfnPrintf(pHlp, " uArchRev = %u\n", pGicDev->uArchRev); 93 pHlp->pfnPrintf(pHlp, " uArchRevMinor = %u\n", pGicDev->uArchRevMinor); 93 94 pHlp->pfnPrintf(pHlp, " uMaxSpi = %u (upto IntId %u)\n", pGicDev->uMaxSpi, 32 * (pGicDev->uMaxSpi + 1)); 94 95 pHlp->pfnPrintf(pHlp, " fExtSpi = %RTbool\n", pGicDev->fExtSpi); … … 311 312 pHlp->pfnSSMPutU32(pSSM, pVM->cCpus); 312 313 pHlp->pfnSSMPutU8(pSSM, pGicDev->uArchRev); 314 pHlp->pfnSSMPutU8(pSSM, pGicDev->uArchRevMinor); 313 315 pHlp->pfnSSMPutU8(pSSM, pGicDev->uMaxSpi); 314 316 pHlp->pfnSSMPutBool(pSSM, pGicDev->fExtSpi); … … 404 406 PGICDEV pGicDev = PDMDEVINS_2_DATA(pDevIns, PGICDEV); 405 407 pHlp->pfnSSMGetU8(pSSM, &pGicDev->uArchRev); 408 pHlp->pfnSSMGetU8(pSSM, &pGicDev->uArchRevMinor); 406 409 pHlp->pfnSSMGetU8(pSSM, &pGicDev->uMaxSpi); 407 410 pHlp->pfnSSMGetBool(pSSM, &pGicDev->fExtSpi); … … 504 507 return pHlp->pfnSSMSetCfgError(pSSM, RT_SRC_POS, N_("Invalid uArchRev, got %u expected range [1,31]"), pGicDev->uArchRev, 505 508 GIC_DIST_REG_PIDR2_ARCHREV_GICV1, GIC_DIST_REG_PIDR2_ARCHREV_GICV4); 509 if (pGicDev->uArchRevMinor == 1) 510 { /* likely */ } 511 else 512 return pHlp->pfnSSMSetCfgError(pSSM, RT_SRC_POS, N_("Invalid uArchRevMinor, got %u expected 1"), pGicDev->uArchRevMinor); 506 513 if (pGicDev->uMaxSpi - 1 < 31) 507 514 { /* likely */ } … … 590 597 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "DistributorMmioBase|RedistributorMmioBase|ItsMmioBase" 591 598 "|ArchRev" 599 "|ArchRevMinor" 592 600 "|MaxSpi" 593 601 "|ExtSpi" … … 618 626 int rc = pHlp->pfnCFGMQueryU8Def(pCfg, "ArchRev", &pGicDev->uArchRev, 3); 619 627 AssertLogRelRCReturn(rc, rc); 620 if (pGicDev->uArchRev == 3)628 if (pGicDev->uArchRev == GIC_DIST_REG_PIDR2_ARCHREV_GICV3) 621 629 pGicDev->Gits.uArchRev = pGicDev->uArchRev; 622 630 else 623 631 return PDMDevHlpVMSetError(pDevIns, VERR_INVALID_PARAMETER, RT_SRC_POS, 624 N_("Configuration error: \"ArchRev\" value %u is not supported"), pGicDev->uArchRev); 632 N_("Configuration error: \"ArchRev\" must be %u, other revisions not supported"), 633 GIC_DIST_REG_PIDR2_ARCHREV_GICV3); 634 635 /** @devcfgm{gic, ArchRevMinor, uint8_t, 1} 636 * Configures the GIC architecture revision minor version. 637 * 638 * Currently we support GICv3.1 only. GICv3.1's only addition to GICv3 is supported 639 * for extended INTID ranges which we currently always support. */ 640 rc = pHlp->pfnCFGMQueryU8Def(pCfg, "ArchRevMinor", &pGicDev->uArchRevMinor, 1); 641 AssertLogRelRCReturn(rc, rc); 642 if (pGicDev->uArchRevMinor == 1) 643 { /* likely */ } 644 else 645 return PDMDevHlpVMSetError(pDevIns, VERR_INVALID_PARAMETER, RT_SRC_POS, 646 N_("Configuration error: \"ArchRevMinor\" must be 1, other minor revisions not supported")); 625 647 626 648 /** @devcfgm{gic, MaxSpi, uint8_t, 31} … … 688 710 N_("Configuration error: \"MaxExtPpi\" must be in the range [0,2]")); 689 711 690 /** @devcfgm{gic, RangeSel Support, bool, true}712 /** @devcfgm{gic, RangeSel, bool, true} 691 713 * Configures whether range-selector support is enabled (GICD_TYPER.RSS and 692 714 * ICC_CTLR_EL1.RSS). */ … … 882 904 * Log features/config. 883 905 */ 884 uint8_t const uArchRev = pGicDev->uArchRev; 885 uint8_t const uMaxSpi = pGicDev->uMaxSpi; 886 bool const fExtSpi = pGicDev->fExtSpi; 887 uint8_t const uMaxExtSpi = pGicDev->uMaxExtSpi; 888 bool const fExtPpi = pGicDev->fExtPpi; 889 uint8_t const uMaxExtPpi = pGicDev->uMaxExtPpi; 890 bool const fRangeSel = pGicDev->fRangeSel; 891 bool const fNmi = pGicDev->fNmi; 892 bool const fMbi = pGicDev->fMbi; 893 bool const fAff3Levels = pGicDev->fAff3Levels; 894 bool const fLpi = pGicDev->fLpi; 895 uint16_t const uExtPpiLast = uMaxExtPpi == GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1087 ? 1087 : GIC_INTID_RANGE_EXT_PPI_LAST; 896 LogRel(("GIC: ArchRev=%u RangeSel=%RTbool Nmi=%RTbool Mbi=%RTbool Aff3Levels=%RTbool Lpi=%RTbool\n", 897 uArchRev, fRangeSel, fNmi, fMbi, fAff3Levels, fLpi)); 906 uint8_t const uArchRev = pGicDev->uArchRev; 907 uint8_t const uArchRevMinor = pGicDev->uArchRevMinor; 908 uint8_t const uMaxSpi = pGicDev->uMaxSpi; 909 bool const fExtSpi = pGicDev->fExtSpi; 910 uint8_t const uMaxExtSpi = pGicDev->uMaxExtSpi; 911 bool const fExtPpi = pGicDev->fExtPpi; 912 uint8_t const uMaxExtPpi = pGicDev->uMaxExtPpi; 913 bool const fRangeSel = pGicDev->fRangeSel; 914 bool const fNmi = pGicDev->fNmi; 915 bool const fMbi = pGicDev->fMbi; 916 bool const fAff3Levels = pGicDev->fAff3Levels; 917 bool const fLpi = pGicDev->fLpi; 918 uint16_t const uExtPpiLast = uMaxExtPpi == GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1087 ? 1087 : GIC_INTID_RANGE_EXT_PPI_LAST; 919 LogRel(("GIC: ArchRev=%u.%u RangeSel=%RTbool Nmi=%RTbool Mbi=%RTbool Aff3Levels=%RTbool Lpi=%RTbool\n", 920 uArchRev, uArchRevMinor, fRangeSel, fNmi, fMbi, fAff3Levels, fLpi)); 898 921 LogRel(("GIC: SPIs=true (%u:32..%u) ExtSPIs=%RTbool (%u:4095..%u) ExtPPIs=%RTbool (%u:1056..%u)\n", 899 922 uMaxSpi, 32 * (uMaxSpi + 1), -
trunk/src/VBox/VMM/include/GICInternal.h
r108716 r108823 106 106 /** @name Configurables. 107 107 * @{ */ 108 /** The GIC architecture (GICD_PIDR2.ArchRev and GICR_PIDR2.ArchRev). */108 /** The GIC architecture revision (GICD_PIDR2.ArchRev and GICR_PIDR2.ArchRev). */ 109 109 uint8_t uArchRev; 110 /** The GIC architecture minor revision (currently 1 as we only support GICv3.1). */ 111 uint8_t uArchRevMinor; 110 112 /** The maximum SPI supported (GICD_TYPER.ItLinesNumber). */ 111 113 uint8_t uMaxSpi; … … 132 134 uint8_t uMaxLpi; 133 135 /** Padding. */ 134 bool afPadding[ 4];136 bool afPadding[3]; 135 137 /** @} */ 136 138
Note:
See TracChangeset
for help on using the changeset viewer.