Changeset 108682 in vbox for trunk/src/VBox/VMM/VMMR3/GICR3.cpp
- Timestamp:
- Mar 21, 2025 9:38:38 AM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168096
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GICR3.cpp
r108531 r108682 82 82 * @param pszArgs Arguments, ignored. 83 83 */ 84 static DECLCALLBACK(void) gicR3 Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)84 static DECLCALLBACK(void) gicR3DbgInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 85 85 { 86 86 RT_NOREF(pszArgs); … … 112 112 * @param pszArgs Arguments, ignored. 113 113 */ 114 static DECLCALLBACK(void) gicR3 InfoDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)114 static DECLCALLBACK(void) gicR3DbgInfoDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 115 115 { 116 116 RT_NOREF(pszArgs); … … 191 191 * @param pszArgs Arguments, ignored. 192 192 */ 193 static DECLCALLBACK(void) gicR3 InfoReDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)193 static DECLCALLBACK(void) gicR3DbgInfoReDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 194 194 { 195 195 NOREF(pszArgs); … … 273 273 274 274 /** 275 * Dumps the GIC ITS information. 276 * 277 * @param pVM The cross context VM structure. 278 * @param pHlp The info helpers. 279 * @param pszArgs Arguments, ignored. 280 */ 281 static DECLCALLBACK(void) gicR3DbgInfoIts(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 282 { 283 PGIC pGic = VM_TO_GIC(pVM); 284 PPDMDEVINS pDevIns = pGic->CTX_SUFF(pDevIns); 285 PCGICDEV pGicDev = PDMDEVINS_2_DATA(pDevIns, PCGICDEV); 286 if (pGicDev->hMmioGits != NIL_IOMMMIOHANDLE) 287 { 288 PCGITSDEV pGitsDev = &pGicDev->Gits; 289 gitsR3DbgInfo(pGitsDev, pHlp, pszArgs); 290 } 291 else 292 pHlp->pfnPrintf(pHlp, "GIC ITS is not mapped/configured for the VM\n"); 293 } 294 295 296 /** 275 297 * @copydoc FNSSMDEVSAVEEXEC 276 298 */ … … 660 682 * Register the MMIO ranges. 661 683 */ 662 RTGCPHYS GCPhysMmioBase = 0; 663 rc = pHlp->pfnCFGMQueryU64(pCfg, "DistributorMmioBase", &GCPhysMmioBase); 664 if (RT_FAILURE(rc)) 665 return PDMDEV_SET_ERROR(pDevIns, rc, 666 N_("Configuration error: Failed to get the \"DistributorMmioBase\" value")); 667 668 rc = PDMDevHlpMmioCreateAndMap(pDevIns, GCPhysMmioBase, GIC_DIST_REG_FRAME_SIZE, gicDistMmioWrite, gicDistMmioRead, 669 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, "GIC_Dist", &pGicDev->hMmioDist); 670 AssertRCReturn(rc, rc); 671 672 rc = pHlp->pfnCFGMQueryU64(pCfg, "RedistributorMmioBase", &GCPhysMmioBase); 673 if (RT_FAILURE(rc)) 674 return PDMDEV_SET_ERROR(pDevIns, rc, 675 N_("Configuration error: Failed to get the \"RedistributorMmioBase\" value")); 676 677 RTGCPHYS const cbRegion = (RTGCPHYS)pVM->cCpus 678 * (GIC_REDIST_REG_FRAME_SIZE + GIC_REDIST_SGI_PPI_REG_FRAME_SIZE); /* Adjacent and per vCPU. */ 679 rc = PDMDevHlpMmioCreateAndMap(pDevIns, GCPhysMmioBase, cbRegion, gicReDistMmioWrite, gicReDistMmioRead, 680 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, "GIC_ReDist", &pGicDev->hMmioReDist); 681 AssertRCReturn(rc, rc); 684 /* Distributor. */ 685 { 686 RTGCPHYS GCPhysMmioBase = 0; 687 rc = pHlp->pfnCFGMQueryU64(pCfg, "DistributorMmioBase", &GCPhysMmioBase); 688 if (RT_FAILURE(rc)) 689 return PDMDEV_SET_ERROR(pDevIns, rc, 690 N_("Configuration error: Failed to get the \"DistributorMmioBase\" value")); 691 692 rc = PDMDevHlpMmioCreateAndMap(pDevIns, GCPhysMmioBase, GIC_DIST_REG_FRAME_SIZE, gicDistMmioWrite, gicDistMmioRead, 693 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, "GIC Distributor", 694 &pGicDev->hMmioDist); 695 AssertRCReturn(rc, rc); 696 } 697 698 /* Redistributor. */ 699 { 700 RTGCPHYS GCPhysMmioBase = 0; 701 rc = pHlp->pfnCFGMQueryU64(pCfg, "RedistributorMmioBase", &GCPhysMmioBase); 702 if (RT_FAILURE(rc)) 703 return PDMDEV_SET_ERROR(pDevIns, rc, 704 N_("Configuration error: Failed to get the \"RedistributorMmioBase\" value")); 705 706 RTGCPHYS const cbRegion = (RTGCPHYS)pVM->cCpus 707 * (GIC_REDIST_REG_FRAME_SIZE + GIC_REDIST_SGI_PPI_REG_FRAME_SIZE); /* Adjacent and per vCPU. */ 708 rc = PDMDevHlpMmioCreateAndMap(pDevIns, GCPhysMmioBase, cbRegion, gicReDistMmioWrite, gicReDistMmioRead, 709 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, "GIC Redistributor", 710 &pGicDev->hMmioReDist); 711 AssertRCReturn(rc, rc); 712 } 713 714 /* ITS. */ 715 { 716 RTGCPHYS GCPhysMmioBase = 0; 717 rc = pHlp->pfnCFGMQueryU64(pCfg, "ItsMmioBase", &GCPhysMmioBase); 718 if (RT_SUCCESS(rc)) 719 { 720 RTGCPHYS const cbRegion = 2 * GITS_REG_FRAME_SIZE; /* 2 frames for GICv3. */ 721 rc = PDMDevHlpMmioCreateAndMap(pDevIns, GCPhysMmioBase, cbRegion, gicItsMmioWrite, gicItsMmioRead, 722 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED, "GIC ITS", 723 &pGicDev->hMmioGits); 724 AssertRCReturn(rc, rc); 725 } 726 else 727 pGicDev->hMmioGits = NIL_IOMMMIOHANDLE; 728 } 682 729 683 730 /* … … 694 741 * not just used during live debugging via the VM debugger. 695 742 */ 696 DBGFR3InfoRegisterInternalEx(pVM, "gic", "Dumps GIC basic information.", gicR3Info, DBGFINFO_FLAGS_ALL_EMTS); 697 DBGFR3InfoRegisterInternalEx(pVM, "gicdist", "Dumps GIC distributor information.", gicR3InfoDist, DBGFINFO_FLAGS_ALL_EMTS); 698 DBGFR3InfoRegisterInternalEx(pVM, "gicredist", "Dumps GIC redistributor information.", gicR3InfoReDist, DBGFINFO_FLAGS_ALL_EMTS); 743 DBGFR3InfoRegisterInternalEx(pVM, "gic", "Dumps GIC basic information.", gicR3DbgInfo, DBGFINFO_FLAGS_ALL_EMTS); 744 DBGFR3InfoRegisterInternalEx(pVM, "gicdist", "Dumps GIC distributor information.", gicR3DbgInfoDist, DBGFINFO_FLAGS_ALL_EMTS); 745 DBGFR3InfoRegisterInternalEx(pVM, "gicredist", "Dumps GIC redistributor information.", gicR3DbgInfoReDist, DBGFINFO_FLAGS_ALL_EMTS); 746 DBGFR3InfoRegisterInternalEx(pVM, "gicits", "Dumps GIC ITS information.", gicR3DbgInfoIts, DBGFINFO_FLAGS_ALL_EMTS); 699 747 700 748 /*
Note:
See TracChangeset
for help on using the changeset viewer.