Changeset 6830 in vbox
- Timestamp:
- Feb 6, 2008 2:30:13 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MM.cpp
r6817 r6830 314 314 } 315 315 316 /* 317 * Setup the base ram (PGM). 318 */ 319 rc = PGMR3PhysRegisterRam(pVM, 0, cbRam, "Base RAM"); 316 320 #ifdef VBOX_WITH_NEW_PHYS_CODE 317 /*318 * Setup the base ram (PGM).319 */320 rc = PGMR3PhysRegisterRam(pVM, 0, cbRam, "Base RAM");321 321 if (RT_SUCCESS(rc) && fPreAlloc) 322 322 { 323 /** @todo implement RamPreAlloc if it is *really* needed - in PGM preferably. (lazy bird) */323 /** @todo RamPreAlloc should be handled at the very end of the VM creation. (lazy bird) */ 324 324 return VM_SET_ERROR(pVM, VERR_NOT_IMPLEMENTED, "TODO: RamPreAlloc"); 325 325 } 326 327 326 #else 328 rc = MMR3PhysRegisterEx(pVM, NULL, 0, cbRam, MM_RAM_FLAGS_DYNAMIC_ALLOC, MM_PHYS_TYPE_NORMAL, "Main Memory");329 327 if (RT_SUCCESS(rc)) 330 328 { -
trunk/src/VBox/VMM/PGMPhys.cpp
r6829 r6830 145 145 pNew->pvHC = NULL; 146 146 147 #ifndef VBOX_WITH_NEW_PHYS_CODE 148 /* Allocate memory for chunk to HC ptr lookup array. */ 149 rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->pavHCChunkHC); 150 AssertRCReturn(rc, rc); 151 pNew->pavHCChunkGC = MMHyperCCToGC(pVM, pNew->pavHCChunkHC); 152 pNew->fFlags |= MM_RAM_FLAGS_DYNAMIC_ALLOC; 153 154 #endif 147 155 RTGCPHYS iPage = cPages; 148 156 while (iPage-- > 0) 149 157 { 158 #ifdef VBOX_WITH_NEW_PHYS_CODE 150 159 pNew->aPages[iPage].HCPhys = pVM->pgm.s.HCPhysZeroPg; 160 #else 161 pNew->aPages[iPage].HCPhys = 0; 162 #endif 151 163 pNew->aPages[iPage].u2State = PGM_PAGE_STATE_ZERO; 152 164 pNew->aPages[iPage].fWrittenTo = 0; … … 177 189 } 178 190 pgmUnlock(pVM); 191 192 /* 193 * Notify REM. 194 */ 195 #ifdef VBOX_WITH_NEW_PHYS_CODE 196 REMR3NotifyPhysRamRegister(pVM, GCPhys, cb, 0); 197 #else 198 REMR3NotifyPhysRamRegister(pVM, GCPhys, cb, MM_RAM_FLAGS_DYNAMIC_ALLOC); 199 #endif 179 200 180 201 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.