- Timestamp:
- Aug 26, 2010 8:44:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMDbg.cpp
r31973 r31975 988 988 * @param fIsMapping Whether it is a mapping. 989 989 */ 990 static int pgmR3DumpHierarchyH CPaePT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, bool fIsMapping)990 static int pgmR3DumpHierarchyHcPaePT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, bool fIsMapping) 991 991 { 992 992 PPGMSHWPTPAE pPT; … … 1060 1060 * @param pHlp Pointer to the output functions. 1061 1061 */ 1062 static int pgmR3DumpHierarchyH CPaePD(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth)1062 static int pgmR3DumpHierarchyHcPaePD(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth) 1063 1063 { 1064 1064 PX86PDPAE pPD; … … 1135 1135 if (cMaxDepth) 1136 1136 { 1137 int rc2 = pgmR3DumpHierarchyH CPaePT(pState, Pde.u & X86_PDE_PAE_PG_MASK_FULL, !!(Pde.u & PGM_PDFLAGS_MAPPING));1137 int rc2 = pgmR3DumpHierarchyHcPaePT(pState, Pde.u & X86_PDE_PAE_PG_MASK_FULL, !!(Pde.u & PGM_PDFLAGS_MAPPING)); 1138 1138 if (rc2 < rc && RT_SUCCESS(rc)) 1139 1139 rc = rc2; … … 1160 1160 * @param pHlp Pointer to the output functions. 1161 1161 */ 1162 static int pgmR3DumpHierarchyH CPaePDPT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth)1162 static int pgmR3DumpHierarchyHcPaePDPT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth) 1163 1163 { 1164 1164 /* Fend of addresses that are out of range in PAE mode - simplifies the code below. */ … … 1234 1234 if (cMaxDepth) 1235 1235 { 1236 int rc2 = pgmR3DumpHierarchyH CPaePD(pState, Pdpe.u & X86_PDPE_PG_MASK_FULL, cMaxDepth);1236 int rc2 = pgmR3DumpHierarchyHcPaePD(pState, Pdpe.u & X86_PDPE_PG_MASK_FULL, cMaxDepth); 1237 1237 if (rc2 < rc && RT_SUCCESS(rc)) 1238 1238 rc = rc2; … … 1264 1264 cMaxDepth--; 1265 1265 1266 const uint64_t u64BaseAddress = u64BaseAddress & ~(RT_BIT_64(X86_PML4_SHIFT) - 1); 1267 uint32_t iFirst = u64BaseAddress >= pState->u64FirstAddress ? 0 1268 : RT_MIN((pState->u64FirstAddress -u64BaseAddress) >> X86_PML4_SHIFT, X86_PG_PAE_ENTRIES); 1269 uint32_t iLast = RT_MIN((pState->u64LastAddress - u64BaseAddress) >> X86_PML4_SHIFT, X86_PG_PAE_ENTRIES-1); 1266 /* 1267 * This is a bit tricky as we're working on unsigned addresses while the 1268 * AMD64 spec uses signed tricks. 1269 */ 1270 uint32_t iFirst = (pState->u64FirstAddress >> X86_PML4_SHIFT) & X86_PML4_MASK; 1271 uint32_t iLast = (pState->u64LastAddress >> X86_PML4_SHIFT) & X86_PML4_MASK; 1272 if ( pState->u64LastAddress <= UINT64_C(0x00007fffffffffff) 1273 || pState->u64FirstAddress >= UINT64_C(0xffff800000000000)) 1274 { /* Simple, nothing to adjust */ } 1275 else if (pState->u64FirstAddress <= UINT64_C(0x00007fffffffffff)) 1276 iLast = X86_PG_AMD64_ENTRIES / 2 - 1; 1277 else if (pState->u64LastAddress >= UINT64_C(0xffff800000000000)) 1278 iFirst = X86_PG_AMD64_ENTRIES / 2; 1279 else 1280 iFirst = X86_PG_AMD64_ENTRIES; /* neither address is canonical */ 1281 1270 1282 for (uint32_t i = iFirst; i <= iLast; i++) 1271 1283 { … … 1299 1311 if (cMaxDepth) 1300 1312 { 1301 int rc2 = pgmR3DumpHierarchyH CPaePDPT(pState, Pml4e.u & X86_PML4E_PG_MASK, cMaxDepth);1313 int rc2 = pgmR3DumpHierarchyHcPaePDPT(pState, Pml4e.u & X86_PML4E_PG_MASK, cMaxDepth); 1302 1314 if (rc2 < rc && RT_SUCCESS(rc)) 1303 1315 rc = rc2; … … 1320 1332 * @param pHlp Pointer to the output functions. 1321 1333 */ 1322 static int pgmR3DumpHierarchyH C32BitPT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, bool fMapping)1334 static int pgmR3DumpHierarchyHc32BitPT(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, bool fMapping) 1323 1335 { 1324 1336 PX86PT pPT; … … 1369 1381 * @param pHlp Pointer to the output functions. 1370 1382 */ 1371 static int pgmR3DumpHierarchyH C32BitPD(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth)1383 static int pgmR3DumpHierarchyHc32BitPD(PPGMR3DUMPHIERARCHYSTATE pState, RTHCPHYS HCPhys, unsigned cMaxDepth) 1372 1384 { 1373 1385 if (pState->u64Address >= _4G) … … 1436 1448 if (cMaxDepth) 1437 1449 { 1438 int rc2 = pgmR3DumpHierarchyH C32BitPT(pState, Pde.u & X86_PDE_PG_MASK, !!(Pde.u & PGM_PDFLAGS_MAPPING));1450 int rc2 = pgmR3DumpHierarchyHc32BitPT(pState, Pde.u & X86_PDE_PG_MASK, !!(Pde.u & PGM_PDFLAGS_MAPPING)); 1439 1451 if (rc2 < rc && RT_SUCCESS(rc)) 1440 1452 rc = rc2; … … 1515 1527 rc = pgmR3DumpHierarchyHcPaePML4(pState, cr3 & X86_CR3_PAGE_MASK, cMaxDepth); 1516 1528 else if (pState->fPae) 1517 rc = pgmR3DumpHierarchyH CPaePDPT(pState, cr3 & X86_CR3_PAE_PAGE_MASK, cMaxDepth);1529 rc = pgmR3DumpHierarchyHcPaePDPT(pState, cr3 & X86_CR3_PAE_PAGE_MASK, cMaxDepth); 1518 1530 else 1519 rc = pgmR3DumpHierarchyH C32BitPD(pState, cr3 & X86_CR3_PAGE_MASK, cMaxDepth);1531 rc = pgmR3DumpHierarchyHc32BitPD(pState, cr3 & X86_CR3_PAGE_MASK, cMaxDepth); 1520 1532 } 1521 1533 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.