Changeset 12968 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 3, 2008 12:16:13 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MM.cpp
r12967 r12968 30 30 * - Locked process memory - Guest RAM and other. (reduce/obsolete this) 31 31 * - Physical guest memory (RAM & ROM) - Moving to PGM. (obsolete this) 32 * 33 * The global memory manager (GMM) is the global counter part / partner of MM. 34 * MM will provide therefore ring-3 callable interfaces for some of the GMM APIs 35 * related to resource tracking (PGM is the user). 32 36 * 33 37 * … … 139 143 140 144 141 142 145 /******************************************************************************* 143 146 * Header Files * … … 175 178 176 179 180 181 177 182 /** 178 183 * Initializes the MM members of the UVM. … … 212 217 * MM determins the virtual address of the hypvervisor memory area by 213 218 * checking for location at previous run. If that property isn't available 214 * it will choose a default starting location, currently 0x e0000000.219 * it will choose a default starting location, currently 0xa0000000. 215 220 * 216 221 * @returns VBox status code. … … 460 465 pVM->mm.s.offVM = 0; /* init assertion on this */ 461 466 462 return 0;467 return VINF_SUCCESS; 463 468 } 464 469 … … 555 560 if (cPages != pVM->mm.s.cBasePages) 556 561 { 557 Log (("mmR3Load: Memory configuration has changed. cPages=%#RX64 saved=%#RX64\n", pVM->mm.s.cBasePages, cPages));562 LogRel(("mmR3Load: Memory configuration has changed. cPages=%#RX64 saved=%#RX64\n", pVM->mm.s.cBasePages, cPages)); 558 563 return VERR_SSM_LOAD_MEMORY_SIZE_MISMATCH; 559 564 } … … 572 577 if (cb != pVM->mm.s.cbRamBase) 573 578 { 574 Log (("mmR3Load: Memory configuration has changed. cbRamBase=%#RX64 save=%#RX64\n", pVM->mm.s.cbRamBase, cb));579 LogRel(("mmR3Load: Memory configuration has changed. cbRamBase=%#RX64 save=%#RX64\n", pVM->mm.s.cbRamBase, cb)); 575 580 return VERR_SSM_LOAD_MEMORY_SIZE_MISMATCH; 576 581 } … … 805 810 * @param ppv Where to store the resulting address. 806 811 * @thread The Emulation Thread. 812 * 813 * @remarks Avoid whenever possible. 814 * Intended for the debugger facility only. 815 * @todo Rename to indicate the special usage. 807 816 */ 808 817 MMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv) … … 843 852 * @param GCPtr GC virtual address. 844 853 * @param cb Number of bytes to read. 854 * 855 * @remarks Intended for the debugger facility only. 856 * @todo Move to DBGF, it's only selecting which functions to use! 845 857 */ 846 858 MMR3DECL(int) MMR3ReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb) … … 860 872 * @param pvSrc The source address (HC of course). 861 873 * @param cb Number of bytes to read. 874 * 875 * @remarks Intended for the debugger facility only. 876 * @todo Move to DBGF, it's only selecting which functions to use! 862 877 */ 863 878 MMR3DECL(int) MMR3WriteGCVirt(PVM pVM, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb) -
trunk/src/VBox/VMM/MMHyper.cpp
r12967 r12968 19 19 * additional information or have any questions. 20 20 */ 21 22 23 21 24 22 … … 50 48 51 49 50 51 52 52 /** 53 53 * Initializes the hypvervisor related MM stuff without … … 515 515 516 516 517 518 519 517 /** 520 518 * Locks and Maps HC virtual memory into the hypervisor region in the GC. … … 787 785 AssertReturn(cbAligned >= cb, VERR_INVALID_PARAMETER); 788 786 void *pv; 789 int rc = SUPPageAlloc(cbAligned >> PAGE_SHIFT, &pv); 787 int rc = SUPPageAlloc(cbAligned >> PAGE_SHIFT, &pv); /** @todo #1865: heap allocation must be changed for osx (only). */ 790 788 if (VBOX_SUCCESS(rc)) 791 789 { … … 1060 1058 * @param GCPtr GC virtual address. 1061 1059 * @param cb Number of bytes to read. 1060 * 1061 * @remarks For DBGF only. 1062 1062 */ 1063 1063 MMR3DECL(int) MMR3HyperReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb) -
trunk/src/VBox/VMM/MMInternal.h
r12967 r12968 351 351 * related to a MMPAGESUBPOOL node in one chunk. That means that after the 352 352 * bitmap (which is of variable size) comes the SUPPAGE records and then 353 * follows the lookup tree nodes. 353 * follows the lookup tree nodes. (The heap in question is the hyper heap.) 354 354 */ 355 355 typedef struct MMPAGESUBPOOL 356 356 { 357 357 /** Pointer to next sub pool. */ 358 struct MMPAGESUBPOOL *pNext;358 R3R0PTRTYPE(struct MMPAGESUBPOOL *) pNext; 359 359 /** Pointer to next sub pool in the free chain. 360 360 * This is NULL if we're not in the free chain or at the end of it. */ 361 struct MMPAGESUBPOOL *pNextFree;361 R3R0PTRTYPE(struct MMPAGESUBPOOL *) pNextFree; 362 362 /** Pointer to array of lock ranges. 363 363 * This is allocated together with the MMPAGESUBPOOL and thus needs no freeing. … … 365 365 * The reserved field is a pointer to this structure. 366 366 */ 367 PSUPPAGEpaPhysPages;367 R3R0PTRTYPE(PSUPPAGE) paPhysPages; 368 368 /** Pointer to the first page. */ 369 void *pvPages;369 R3R0PTRTYPE(void *) pvPages; 370 370 /** Size of the subpool. */ 371 371 unsigned cPages; … … 387 387 { 388 388 /** List of subpools. */ 389 PMMPAGESUBPOOLpHead;389 R3R0PTRTYPE(PMMPAGESUBPOOL) pHead; 390 390 /** Head of subpools with free pages. */ 391 PMMPAGESUBPOOLpHeadFree;391 R3R0PTRTYPE(PMMPAGESUBPOOL) pHeadFree; 392 392 /** AVLPV tree for looking up HC virtual addresses. 393 393 * The tree contains MMLOOKUPVIRTPP records. 394 394 */ 395 PAVLPVNODECOREpLookupVirt;395 R3R0PTRTYPE(PAVLPVNODECORE) pLookupVirt; 396 396 /** Tree for looking up HC physical addresses. 397 397 * The tree contains MMLOOKUPPHYSHC records. 398 398 */ 399 AVLHCPHYSTREEpLookupPhys;399 R3R0PTRTYPE(AVLHCPHYSTREE) pLookupPhys; 400 400 /** Pointer to the VM this pool belongs. */ 401 PVMpVM;401 R3R0PTRTYPE(PVM) pVM; 402 402 /** Flag indicating the allocation method. 403 403 * Set: SUPLowAlloc(). … … 601 601 R3PTRTYPE(void *) pvR3; 602 602 /** Host context ring-0 pointer. */ 603 /** @todo #1865: Check if this actually works (doubt it) */ 603 604 RTR0PTR pvR0; 604 605 /** Pointer to the locked mem record. */ … … 611 612 /** Host context pointer. */ 612 613 R3PTRTYPE(void *) pvR3; 614 /** @todo #1865: Add a pvR0 here! */ 613 615 /** HC physical address corresponding to pvR3. */ 614 616 RTHCPHYS HCPhys; -
trunk/src/VBox/VMM/PGMMap.cpp
r12964 r12968 1122 1122 * @param GCPtrSrc The source address (GC virtual address). 1123 1123 * @param cb Number of bytes to read. 1124 * 1125 * @remarks The is indirectly for DBGF only. 1126 * @todo Consider renaming it to indicate it's special usage, or just 1127 * reimplement it in MMR3HyperReadGCVirt. 1124 1128 */ 1125 1129 PGMR3DECL(int) PGMR3MapRead(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb) -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r12967 r12968 154 154 155 155 /** 156 * Allocates memory in the Hypervisor ( GC VMM) area.156 * Allocates memory in the Hypervisor (RC VMM) area. 157 157 * The returned memory is of course zeroed. 158 158 * -
trunk/src/VBox/VMM/VMMAll/MMAllPagePool.cpp
r12967 r12968 95 95 MMDECL(void *) mmPagePoolPhys2Ptr(PMMPAGEPOOL pPool, RTHCPHYS HCPhys) 96 96 { 97 #if 0 /** @todo have to fix the debugger, but until then this is going on my ne vers. */97 #if 0 /** @todo have to fix the debugger, but until then this is going on my nerves. */ 98 98 #ifdef IN_RING3 99 99 VM_ASSERT_EMT(pPool->pVM); … … 221 221 return VINF_SUCCESS; 222 222 } 223
Note:
See TracChangeset
for help on using the changeset viewer.