Changeset 31206 in vbox
- Timestamp:
- Jul 29, 2010 1:05:31 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
-
PGM.cpp (modified) (1 diff)
-
PGMInternal.h (modified) (1 diff)
-
PGMPhys.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r31198 r31206 2444 2444 pgmLock(pVM); 2445 2445 pgmR3PhysRamTerm(pVM); 2446 pgmR3PhysRomTerm(pVM); 2446 2447 pgmUnlock(pVM); 2447 2448 -
trunk/src/VBox/VMM/PGMInternal.h
r31178 r31206 3583 3583 int pgmR3PhysChunkMap(PVM pVM, uint32_t idChunk, PPPGMCHUNKR3MAP ppChunk); 3584 3584 int pgmR3PhysRamTerm(PVM pVM); 3585 void pgmR3PhysRomTerm(PVM pVM); 3585 3586 3586 3587 int pgmR3PoolInit(PVM pVM); -
trunk/src/VBox/VMM/PGMPhys.cpp
r31127 r31206 879 879 880 880 /* Flush the recompiler's TLB as well. */ 881 for ( unsignedi = 0; i < pVM->cCpus; i++)881 for (VMCPUID i = 0; i < pVM->cCpus; i++) 882 882 CPUMSetChangedFlags(&pVM->aCpus[i], CPUM_CHANGED_GLOBAL_TLB_FLUSH); 883 883 … … 2808 2808 pRomNew->fFlags = fFlags; 2809 2809 pRomNew->idSavedState = UINT8_MAX; 2810 #ifdef VBOX_STRICT 2811 pRomNew->pvOriginal = fFlags & PGMPHYS_ROM_FLAGS_PERMANENT_BINARY 2812 ? pvBinary : RTMemDup(pvBinary, cPages * PAGE_SIZE); 2813 #else 2810 2814 pRomNew->pvOriginal = fFlags & PGMPHYS_ROM_FLAGS_PERMANENT_BINARY ? pvBinary : NULL; 2815 #endif 2811 2816 pRomNew->pszDesc = pszDesc; 2812 2817 … … 2889 2894 * @param pvUser User argument. 2890 2895 */ 2891 static DECLCALLBACK(int) pgmR3PhysRomWriteHandler(PVM pVM, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser) 2896 static DECLCALLBACK(int) pgmR3PhysRomWriteHandler(PVM pVM, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf, 2897 PGMACCESSTYPE enmAccessType, void *pvUser) 2892 2898 { 2893 2899 PPGMROMRANGE pRom = (PPGMROMRANGE)pvUser; … … 2929 2935 2930 2936 /* 2931 * Write to the rampage.2937 * Write to the RAM page. 2932 2938 */ 2933 2939 case PGMROMPROT_READ_ROM_WRITE_RAM: … … 3073 3079 3074 3080 /** 3081 * Called by PGMR3Term to free resources. 3082 * 3083 * ASSUMES that the caller owns the PGM lock. 3084 * 3085 * @param pVM The VM handle. 3086 */ 3087 void pgmR3PhysRomTerm(PVM pVM) 3088 { 3089 #ifdef RT_STRICT 3090 /* 3091 * Free the heap copy of the original bits. 3092 */ 3093 for (PPGMROMRANGE pRom = pVM->pgm.s.pRomRangesR3; pRom; pRom = pRom->pNextR3) 3094 { 3095 if ( pRom->pvOriginal 3096 && !(pRom->fFlags & PGMPHYS_ROM_FLAGS_PERMANENT_BINARY)) 3097 { 3098 RTMemFree((void *)pRom->pvOriginal); 3099 pRom->pvOriginal = NULL; 3100 } 3101 } 3102 #endif 3103 } 3104 3105 3106 /** 3075 3107 * Change the shadowing of a range of ROM pages. 3076 3108 *
Note:
See TracChangeset
for help on using the changeset viewer.

