Changeset 70741 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jan 25, 2018 3:10:14 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r69111 r70741 1511 1511 pgmR3InfoCr3); 1512 1512 DBGFR3InfoRegisterInternal(pVM, "phys", 1513 "Dumps all the physical address ranges. No arguments.",1513 "Dumps all the physical address ranges. Pass 'verbose' to get more details.", 1514 1514 pgmR3PhysInfo); 1515 1515 DBGFR3InfoRegisterInternal(pVM, "handlers", … … 2797 2797 static DECLCALLBACK(void) pgmR3PhysInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 2798 2798 { 2799 NOREF(pszArgs); 2799 bool const fVerbose = pszArgs && strstr(pszArgs, "verbose") != NULL; 2800 2800 2801 pHlp->pfnPrintf(pHlp, 2801 2802 "RAM ranges (pVM=%p)\n" … … 2806 2807 2807 2808 for (PPGMRAMRANGE pCur = pVM->pgm.s.pRamRangesXR3; pCur; pCur = pCur->pNextR3) 2809 { 2808 2810 pHlp->pfnPrintf(pHlp, 2809 2811 "%RGp-%RGp %RHv %s\n", … … 2812 2814 pCur->pvR3, 2813 2815 pCur->pszDesc); 2816 if (fVerbose) 2817 { 2818 RTGCPHYS const cPages = pCur->cb >> X86_PAGE_SHIFT; 2819 RTGCPHYS iPage = 0; 2820 while (iPage < cPages) 2821 { 2822 RTGCPHYS const iFirstPage = iPage; 2823 PGMPAGETYPE const enmType = (PGMPAGETYPE)PGM_PAGE_GET_TYPE(&pCur->aPages[iPage]); 2824 do 2825 iPage++; 2826 while (iPage < cPages && (PGMPAGETYPE)PGM_PAGE_GET_TYPE(&pCur->aPages[iPage]) == enmType); 2827 const char *pszType; 2828 const char *pszMore = NULL; 2829 switch (enmType) 2830 { 2831 case PGMPAGETYPE_RAM: 2832 pszType = "RAM"; 2833 break; 2834 2835 case PGMPAGETYPE_MMIO2: 2836 pszType = "MMIO2"; 2837 break; 2838 2839 case PGMPAGETYPE_MMIO2_ALIAS_MMIO: 2840 pszType = "MMIO2-alias-MMIO"; 2841 break; 2842 2843 case PGMPAGETYPE_SPECIAL_ALIAS_MMIO: 2844 pszType = "special-alias-MMIO"; 2845 break; 2846 2847 case PGMPAGETYPE_ROM_SHADOW: 2848 case PGMPAGETYPE_ROM: 2849 { 2850 pszType = enmType == PGMPAGETYPE_ROM_SHADOW ? "ROM-shadowed" : "ROM"; 2851 2852 RTGCPHYS const GCPhysFirstPg = iFirstPage * X86_PAGE_SIZE; 2853 PPGMROMRANGE pRom = pVM->pgm.s.pRomRangesR3; 2854 while (pRom && GCPhysFirstPg > pRom->GCPhysLast) 2855 pRom = pRom->pNextR3; 2856 if (pRom && GCPhysFirstPg - pRom->GCPhys < pRom->cb) 2857 pszMore = pRom->pszDesc; 2858 break; 2859 } 2860 2861 case PGMPAGETYPE_MMIO: 2862 { 2863 pszType = "MMIO"; 2864 pgmLock(pVM); 2865 PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, iFirstPage * X86_PAGE_SIZE); 2866 if (pCur) 2867 pszMore = pCur->pszDesc; 2868 pgmUnlock(pVM); 2869 break; 2870 } 2871 2872 case PGMPAGETYPE_INVALID: 2873 pszType = "invalid"; 2874 break; 2875 2876 default: 2877 pszType = "bad"; 2878 break; 2879 } 2880 if (pszMore) 2881 pHlp->pfnPrintf(pHlp, " %RGp-%RGp %-20s %s\n", 2882 pCur->GCPhys + iFirstPage * X86_PAGE_SIZE, 2883 pCur->GCPhys + iPage * X86_PAGE_SIZE, 2884 pszType, pszMore); 2885 else 2886 pHlp->pfnPrintf(pHlp, " %RGp-%RGp %s\n", 2887 pCur->GCPhys + iFirstPage * X86_PAGE_SIZE, 2888 pCur->GCPhys + iPage * X86_PAGE_SIZE, 2889 pszType); 2890 2891 } 2892 } 2893 } 2814 2894 } 2815 2895
Note:
See TracChangeset
for help on using the changeset viewer.