Changeset 100165 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jun 13, 2023 11:56:42 AM (21 months ago)
- svn:sync-xref-src-repo-rev:
- 157864
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GICR3.cpp
r100108 r100165 71 71 72 72 /** 73 * Dumps basic APIC state. 74 * 75 * @param pVM The cross context VM structure. 76 * @param pHlp The info helpers. 77 * @param pszArgs Arguments, ignored. 78 */ 79 static DECLCALLBACK(void) gicR3Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 80 { 81 RT_NOREF(pVM, pHlp, pszArgs); 82 } 83 84 85 /** 86 * Dumps GIC Distributor information. 87 * 88 * @param pVM The cross context VM structure. 89 * @param pHlp The info helpers. 90 * @param pszArgs Arguments, ignored. 91 */ 92 static DECLCALLBACK(void) gicR3InfoDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 93 { 94 RT_NOREF(pszArgs); 95 96 PGIC pGic = VM_TO_GIC(pVM); 97 PPDMDEVINS pDevIns = pGic->CTX_SUFF(pDevIns); 98 PGICDEV pGicDev = PDMDEVINS_2_DATA(pDevIns, PGICDEV); 99 100 pHlp->pfnPrintf(pHlp, "GICv3 Distributor:\n"); 101 pHlp->pfnPrintf(pHlp, " IGRP0 = %#RX32\n", pGicDev->u32RegIGrp0); 102 pHlp->pfnPrintf(pHlp, " ICFG0 = %#RX32\n", pGicDev->u32RegICfg0); 103 pHlp->pfnPrintf(pHlp, " ICFG1 = %#RX32\n", pGicDev->u32RegICfg1); 104 pHlp->pfnPrintf(pHlp, " bmIntEnabled = %#RX32\n", pGicDev->bmIntEnabled); 105 pHlp->pfnPrintf(pHlp, " bmIntPending = %#RX32\n", pGicDev->bmIntPending); 106 pHlp->pfnPrintf(pHlp, " bmIntActive = %#RX32\n", pGicDev->bmIntActive); 107 pHlp->pfnPrintf(pHlp, " Interrupt priorities:\n"); 108 for (uint32_t i = 0; i < RT_ELEMENTS(pGicDev->abIntPriority); i++) 109 pHlp->pfnPrintf(pHlp, " INTID %u = %u\n", GIC_INTID_RANGE_SPI_START + i, pGicDev->abIntPriority[i]); 110 111 pHlp->pfnPrintf(pHlp, " fIrqGrp0Enabled = %RTbool\n", pGicDev->fIrqGrp0Enabled); 112 pHlp->pfnPrintf(pHlp, " fIrqGrp1Enabled = %RTbool\n", pGicDev->fIrqGrp1Enabled); 113 } 114 115 116 /** 117 * Dumps the GIC Redistributor information. 118 * 119 * @param pVM The cross context VM structure. 120 * @param pHlp The info helpers. 121 * @param pszArgs Arguments, ignored. 122 */ 123 static DECLCALLBACK(void) gicR3InfoReDist(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 124 { 125 NOREF(pszArgs); 126 PVMCPU pVCpu = VMMGetCpu(pVM); 127 if (!pVCpu) 128 pVCpu = pVM->apCpusR3[0]; 129 130 PGICCPU pGicVCpu = VMCPU_TO_GICCPU(pVCpu); 131 132 pHlp->pfnPrintf(pHlp, "VCPU[%u] Redistributor:\n", pVCpu->idCpu); 133 pHlp->pfnPrintf(pHlp, " IGRP0 = %#RX32\n", pGicVCpu->u32RegIGrp0); 134 pHlp->pfnPrintf(pHlp, " ICFG0 = %#RX32\n", pGicVCpu->u32RegICfg0); 135 pHlp->pfnPrintf(pHlp, " ICFG1 = %#RX32\n", pGicVCpu->u32RegICfg1); 136 pHlp->pfnPrintf(pHlp, " bmIntEnabled = %#RX32\n", pGicVCpu->bmIntEnabled); 137 pHlp->pfnPrintf(pHlp, " bmIntPending = %#RX32\n", pGicVCpu->bmIntPending); 138 pHlp->pfnPrintf(pHlp, " bmIntActive = %#RX32\n", pGicVCpu->bmIntActive); 139 pHlp->pfnPrintf(pHlp, " Interrupt priorities:\n"); 140 for (uint32_t i = 0; i < RT_ELEMENTS(pGicVCpu->abIntPriority); i++) 141 pHlp->pfnPrintf(pHlp, " INTID %u = %u\n", i, pGicVCpu->abIntPriority[i]); 142 143 pHlp->pfnPrintf(pHlp, "VCPU[%u] ICC state:\n", pVCpu->idCpu); 144 pHlp->pfnPrintf(pHlp, " fIrqGrp0Enabled = %RTbool\n", pGicVCpu->fIrqGrp0Enabled); 145 pHlp->pfnPrintf(pHlp, " fIrqGrp1Enabled = %RTbool\n", pGicVCpu->fIrqGrp1Enabled); 146 pHlp->pfnPrintf(pHlp, " bInterruptPriority = %u\n", pGicVCpu->bInterruptPriority); 147 pHlp->pfnPrintf(pHlp, " bBinaryPointGrp0 = %u\n", pGicVCpu->bBinaryPointGrp0); 148 pHlp->pfnPrintf(pHlp, " bBinaryPointGrp1 = %u\n", pGicVCpu->bBinaryPointGrp1); 149 pHlp->pfnPrintf(pHlp, " idxRunningPriority = %u\n", pGicVCpu->idxRunningPriority); 150 pHlp->pfnPrintf(pHlp, " Running priority = %u\n", pGicVCpu->abRunningPriorities[pGicVCpu->idxRunningPriority]); 151 } 152 153 154 /** 73 155 * @interface_method_impl{PDMDEVREG,pfnReset} 74 156 */ … … 201 283 202 284 /* 285 * Register debugger info callbacks. 286 * 287 * We use separate callbacks rather than arguments so they can also be 288 * dumped in an automated fashion while collecting crash diagnostics and 289 * not just used during live debugging via the VM debugger. 290 */ 291 DBGFR3InfoRegisterInternalEx(pVM, "gic", "Dumps GIC basic information.", gicR3Info, DBGFINFO_FLAGS_ALL_EMTS); 292 DBGFR3InfoRegisterInternalEx(pVM, "gicdist", "Dumps GIC Distributor information.", gicR3InfoDist, DBGFINFO_FLAGS_ALL_EMTS); 293 DBGFR3InfoRegisterInternalEx(pVM, "gicredist", "Dumps GIC Redistributor information.", gicR3InfoReDist, DBGFINFO_FLAGS_ALL_EMTS); 294 295 /* 203 296 * Statistics. 204 297 */ … … 232 325 # undef GIC_PROF_COUNTER 233 326 327 gicR3Reset(pDevIns); 234 328 return VINF_SUCCESS; 235 329 }
Note:
See TracChangeset
for help on using the changeset viewer.