Changeset 14519 in vbox for trunk/src/VBox
- Timestamp:
- Nov 24, 2008 2:07:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp
r14517 r14519 285 285 g_pPGMR0DynMap = NULL; 286 286 287 AssertLogRelMsg(!pThis->cUsers && !pThis->paPages && !pThis-> cPages,288 ("cUsers=%d paPages=%p cPages=%#x\n",289 pThis->cUsers, pThis->paPages, pThis-> cPages));287 AssertLogRelMsg(!pThis->cUsers && !pThis->paPages && !pThis->pvSavedPTEs && !pThis->cPages, 288 ("cUsers=%d paPages=%p pvSavedPTEs=%p cPages=%#x\n", 289 pThis->cUsers, pThis->paPages, pThis->pvSavedPTEs, pThis->cPages)); 290 290 291 291 /* Free the associated resources. */ … … 648 648 * The next level. 649 649 */ 650 uint32_t iEntry = ((uint ptr_t)pvPage >> pPgLvl->a[i].fPtrShift) & pPgLvl->a[i].fPtrMask;650 uint32_t iEntry = ((uint64_t)(uintptr_t)pvPage >> pPgLvl->a[i].fPtrShift) & pPgLvl->a[i].fPtrMask; 651 651 if (pThis->fLegacyMode) 652 652 { … … 662 662 if ((uEntry & pPgLvl->a[i].fAndMask) != pPgLvl->a[i].fResMask) 663 663 { 664 LogRel(("PGMR0DynMap: internal error - iPgLvl=%u cLevels=%u uEntry=%#llx fAnd=%#llx fRes=%#llx got=%#llx\n", 665 i, pPgLvl->cLevels, uEntry, pPgLvl->a[i].fAndMask, pPgLvl->a[i].fResMask, uEntry & pPgLvl->a[i].fAndMask)); 664 LogRel(("PGMR0DynMap: internal error - iPgLvl=%u cLevels=%u uEntry=%#llx fAnd=%#llx fRes=%#llx got=%#llx\n" 665 "PGMR0DynMap: pv=%p pvPage=%p iEntry=%#x fLegacyMode=%RTbool\n", 666 i, pPgLvl->cLevels, uEntry, pPgLvl->a[i].fAndMask, pPgLvl->a[i].fResMask, uEntry & pPgLvl->a[i].fAndMask, 667 pPgLvl->a[i].u.pv, pvPage, iEntry, pThis->fLegacyMode)); 666 668 return VERR_INTERNAL_ERROR; 667 669 } … … 715 717 716 718 /* 717 * Allocate the segment structure and pages memory.719 * Allocate the segment structure and pages of memory, then touch all the pages (paranoia). 718 720 */ 719 721 uint32_t cMaxPTs = cPages / (pThis->fLegacyMode ? X86_PG_ENTRIES : X86_PG_PAE_ENTRIES) + 2; … … 730 732 uint8_t *pbPage = (uint8_t *)RTR0MemObjAddress(pSeg->hMemObj); 731 733 AssertMsg(VALID_PTR(pbPage) && !((uintptr_t)pbPage & PAGE_OFFSET_MASK), ("%p\n", pbPage)); 734 memset(pbPage, 0xfe, cPages << PAGE_SHIFT); 732 735 733 736 /* … … 799 802 RTMemFree(pSeg); 800 803 801 /* Don't bother resizing the arrays, too layz. */ 804 /* Don't bother resizing the arrays, but free them if we're the only user. */ 805 if (!pThis->cPages) 806 { 807 RTMemFree(pThis->paPages); 808 pThis->paPages = NULL; 809 RTMemFree(pThis->pvSavedPTEs); 810 pThis->pvSavedPTEs = NULL; 811 } 802 812 return rc; 803 813 } … … 889 899 Assert(!pvUser2); 890 900 PPGMR0DYNMAP pThis = (PPGMR0DYNMAP)pvUser1; 891 Assert Ptr(pThis == g_pPGMR0DynMap);901 Assert(pThis == g_pPGMR0DynMap); 892 902 PPGMR0DYNMAPENTRY paPages = pThis->paPages; 893 903 uint32_t iPage = pThis->cPages;
Note:
See TracChangeset
for help on using the changeset viewer.