Changeset 17547 in vbox
- Timestamp:
- Mar 9, 2009 2:48:02 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43983
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/gmm.h
r17432 r17547 108 108 109 109 110 /** @def GMM_GCPHYS_LAST 111 * The last of the valid guest physical address as it applies to GMM pages. 112 * 113 * This must reflect the constraints imposed by the RTGCPHYS type and 114 * the guest page frame number used internally in GMMPAGE. 115 * 116 * @note Note this corresponds to GMM_PAGE_PFN_LAST. */ 117 #if HC_ARCH_BITS == 64 118 # define GMM_GCPHYS_LAST UINT64_C(0x00000fffffff0000) /* 2^44 (16TB) - 0x10000 */ 119 #else 120 # define GMM_GCPHYS_LAST UINT64_C(0x0000000fffff0000) /* 2^36 (64GB) - 0x10000 */ 121 #endif 122 110 123 /** 111 124 * Over-commitment policy. … … 241 254 typedef GMMPAGEDESC *PGMMPAGEDESC; 242 255 243 /** GMMPAGEDESC::HCPhysGCPhys value that indicates that the page is shared. */ 244 #define GMM_GCPHYS_UNSHAREABLE (RTHCPHYS)(0xfffffff0) 256 /** GMMPAGEDESC::HCPhysGCPhys value that indicates that the page is unsharable. 257 * @note This corresponds to GMM_PAGE_PFN_UNSHAREABLE. */ 258 #if HC_ARCH_BITS == 64 259 # define GMM_GCPHYS_UNSHAREABLE UINT64_C(0x00000fffffff1000) 260 #else 261 # define GMM_GCPHYS_UNSHAREABLE UINT64_C(0x0000000fffff1000) 262 #endif 245 263 246 264 GMMR0DECL(int) GMMR0Init(void); -
trunk/src/VBox/VMM/MM.cpp
r17541 r17547 313 313 else 314 314 AssertMsgRCReturn(rc, ("Configuration error: Failed to query integer \"RamSize\", rc=%Rrc.\n", rc), rc); 315 AssertLogRelMsg(!(cbRam & ~X86_PTE_PAE_PG_MASK), ("%RGp\n", cbRam)); 315 AssertLogRelMsg(!(cbRam & ~X86_PTE_PAE_PG_MASK), ("%RGp X86_PTE_PAE_PG_MASK=%RX64\n", cbRam, X86_PTE_PAE_PG_MASK)); 316 AssertLogRelMsgReturn(cbRam <= GMM_GCPHYS_LAST, ("cbRam=%RGp GMM_GCPHYS_LAST=%RX64\n", cbRam, GMM_GCPHYS_LAST), VERR_OUT_OF_RANGE); 316 317 cbRam &= X86_PTE_PAE_PG_MASK; 317 318 pVM->mm.s.cbRamBase = cbRam; -
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r17431 r17547 327 327 #define GMM_PAGE_IS_FREE(pPage) ( (pPage)->Common.u2State == GMM_PAGE_STATE_FREE ) 328 328 329 /** @def GMM_PAGE_PFN_END 330 * The end of the valid guest pfn range, {0..GMM_PAGE_PFN_END-1}. 331 * @remark Some of the values outside the range has special meaning, see related \#defines. 329 /** @def GMM_PAGE_PFN_LAST 330 * The last valid guest pfn range. 331 * @remark Some of the values outside the range has special meaning, 332 * see GMM_PAGE_PFN_UNSHAREABLE. 332 333 */ 333 334 #if HC_ARCH_BITS == 64 334 # define GMM_PAGE_PFN_ ENDUINT32_C(0xfffffff0)335 # define GMM_PAGE_PFN_LAST UINT32_C(0xfffffff0) 335 336 #else 336 # define GMM_PAGE_PFN_ ENDUINT32_C(0x00fffff0)337 # define GMM_PAGE_PFN_LAST UINT32_C(0x00fffff0) 337 338 #endif 339 AssertCompile(GMM_PAGE_PFN_LAST == (GMM_GCPHYS_LAST >> PAGE_SHIFT)); 338 340 339 341 /** @def GMM_PAGE_PFN_UNSHAREABLE … … 345 347 # define GMM_PAGE_PFN_UNSHAREABLE UINT32_C(0x00fffff1) 346 348 #endif 347 348 /** @def GMM_GCPHYS_LAST 349 * The last of the valid guest physical address as it applies to GMM pages. 350 * 351 * This must reflect the constraints imposed by the RTGCPHYS type and 352 * the guest page frame number used internally in GMMPAGE. */ 353 #if 1 354 # define GMM_GCPHYS_LAST UINT32_C(0xfffff000) /* 2^32 (4GB) - 0x1000 */ 355 #else /** @todo enable this after changing NIL_RTHCPHYS to ~(RTHCPHYS)0! */ 356 #if HC_ARCH_BITS == 64 357 # define GMM_GCPHYS_LAST UINT64_C(0x00000fffffff0000) /* 2^44 (16TB) - 0x10000 */ 358 #else 359 # define GMM_GCPHYS_LAST UINT64_C(0x0000000fffff0000) /* 2^36 (64GB) - 0x10000 */ 360 #endif 361 #endif 349 AssertCompile(GMM_PAGE_PFN_UNSHAREABLE == (GMM_GCPHYS_UNSHAREABLE >> PAGE_SHIFT)); 362 350 363 351
Note:
See TracChangeset
for help on using the changeset viewer.