- Timestamp:
- Oct 7, 2008 11:29:51 AM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r13035 r13038 41 41 VMMR3_DEFS += VBOX_WITH_PREALLOC_RAM_BY_DEFAULT 42 42 endif 43 VMMR3_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE 43 VMMR3_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R3 44 44 VMMR3_INCS := \ 45 45 $(PATH_SUB_CURRENT) \ … … 270 270 VMMGC_DEFS += VBOX_WITH_IDT_PATCHING 271 271 endif 272 VMMGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE 272 VMMGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_RC 273 273 VMMGC_SYSSUFF = .gc 274 274 VMMGC_LIBS = \ … … 357 357 VMMR0_DEFS += VBOX_WITH_IDT_PATCHING 358 358 endif 359 VMMR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE 359 VMMR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE VBOX_WITH_2X_4GB_ADDR_SPACE_IN_0 360 360 ifeq ($(VBOX_LDR_FMT),pe) 361 361 VMMR0_LDFLAGS = -Entry:VMMR0EntryEx -
trunk/src/VBox/VMM/PGM.cpp
r13035 r13038 1873 1873 pVM->pgm.s.pRamRangesRC = MMHyperR3ToRC(pVM, pVM->pgm.s.pRamRangesR3); 1874 1874 for (PPGMRAMRANGE pCur = pVM->pgm.s.pRamRangesR3; pCur->pNextR3; pCur = pCur->pNextR3) 1875 #ifdef VBOX_WITH_NEW_PHYS_CODE1876 1875 pCur->pNextRC = MMHyperR3ToRC(pVM, pCur->pNextR3); 1877 #else1878 {1879 pCur->pNextRC = MMHyperR3ToRC(pVM, pCur->pNextR3);1880 if (pCur->pavHCChunkGC)1881 pCur->pavHCChunkGC = MMHyperHC2GC(pVM, pCur->pavHCChunkHC);1882 }1883 #endif1884 1876 } 1885 1877 -
trunk/src/VBox/VMM/PGMInternal.h
r13035 r13038 222 222 #ifdef IN_GC 223 223 # define PGM_HCPHYS_2_PTR(pVM, HCPhys, ppv) PGMGCDynMapHCPage(pVM, HCPhys, (void **)(ppv)) 224 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE )224 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 225 225 # define PGM_HCPHYS_2_PTR(pVM, HCPhys, ppv) PGMR0DynMapHCPage(pVM, HCPhys, (void **)(ppv)) 226 226 #else … … 242 242 #ifdef IN_GC 243 243 # define PGM_GCPHYS_2_PTR(pVM, GCPhys, ppv) PGMGCDynMapGCPage(pVM, GCPhys, (void **)(ppv)) 244 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE )244 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 245 245 # define PGM_GCPHYS_2_PTR(pVM, GCPhys, ppv) PGMR0DynMapGCPage(pVM, GCPhys, (void **)(ppv)) 246 246 #else … … 262 262 #ifdef IN_GC 263 263 # define PGM_GCPHYS_2_PTR_EX(pVM, GCPhys, ppv) PGMGCDynMapGCPageEx(pVM, GCPhys, (void **)(ppv)) 264 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE )264 #elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 265 265 # define PGM_GCPHYS_2_PTR_EX(pVM, GCPhys, ppv) PGMR0DynMapGCPageEx(pVM, GCPhys, (void **)(ppv)) 266 266 #else … … 935 935 /** MM_RAM_* flags */ 936 936 uint32_t fFlags; 937 #ifdef VBOX_WITH_NEW_PHYS_CODE938 937 uint32_t u32Alignment; /**< alignment. */ 939 #else 940 /** HC virtual lookup ranges for chunks - RC Ptr. 941 * Currently only used with MM_RAM_FLAGS_DYNAMIC_ALLOC ranges. */ 942 RCPTRTYPE(PRTHCPTR) pavHCChunkGC; 938 #ifndef VBOX_WITH_NEW_PHYS_CODE 943 939 /** HC virtual lookup ranges for chunks - R3/R0 Ptr. 944 940 * Currently only used with MM_RAM_FLAGS_DYNAMIC_ALLOC ranges. */ … … 3049 3045 #endif /* !IN_GC */ 3050 3046 3051 3052 #ifndef VBOX_WITH_NEW_PHYS_CODE 3047 #if !defined(IN_GC) /** @todo && !defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) */ 3048 3049 # ifndef VBOX_WITH_NEW_PHYS_CODE 3053 3050 /** 3054 3051 * Convert GC Phys to HC Virt. … … 3087 3084 return VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS; 3088 3085 } 3089 # endif /* !VBOX_WITH_NEW_PHYS_CODE */3086 # endif /* !VBOX_WITH_NEW_PHYS_CODE */ 3090 3087 3091 3088 … … 3135 3132 } 3136 3133 3134 #endif /* !IN_GC && !defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) */ 3137 3135 3138 3136 /** … … 3165 3163 { 3166 3164 unsigned idx = (off >> PGM_DYNAMIC_CHUNK_SHIFT); 3165 #if defined(IN_GC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 3166 PRTR3PTR paChunkR3Ptrs = (PRTR3PTR)MMHyperR3ToCC(PGM2VM(pPGM), pRam->pavHCChunkHC); 3167 *pHCPtr = paChunkR3Ptrs[idx] + (off & PGM_DYNAMIC_CHUNK_OFFSET_MASK); 3168 #else 3167 3169 *pHCPtr = (RTHCPTR)((RTHCUINTPTR)CTXSUFF(pRam->pavHCChunk)[idx] + (off & PGM_DYNAMIC_CHUNK_OFFSET_MASK)); 3170 #endif 3168 3171 return VINF_SUCCESS; 3169 3172 } -
trunk/src/VBox/VMM/PGMPhys.cpp
r13035 r13038 246 246 pNew->pvR3 = NULL; 247 247 pNew->pavHCChunkHC = NULL; 248 pNew->pavHCChunkGC = 0;249 248 250 249 #ifndef VBOX_WITH_NEW_PHYS_CODE … … 252 251 rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->pavHCChunkHC); 253 252 AssertRCReturn(rc, rc); 254 pNew->pavHCChunkGC = MMHyperCCToRC(pVM, pNew->pavHCChunkHC);255 253 pNew->fFlags |= MM_RAM_FLAGS_DYNAMIC_ALLOC; 256 254 … … 491 489 pNew->pvR3 = NULL; 492 490 pNew->pavHCChunkHC = NULL; 493 pNew->pavHCChunkGC = 0;494 491 495 492 uint32_t iPage = cPages; … … 703 700 pNew->RamRange.pvR3 = pvPages; ///@todo remove this [new phys code] 704 701 pNew->RamRange.pavHCChunkHC = NULL; ///@todo remove this [new phys code] 705 pNew->RamRange.pavHCChunkGC = 0; ///@todo remove this [new phys code]706 702 707 703 uint32_t iPage = cPages; … … 1777 1773 pNew->fFlags = fFlags; 1778 1774 pNew->pavHCChunkHC = NULL; 1779 pNew->pavHCChunkGC = 0;1780 1775 1781 1776 unsigned iPage = cb >> PAGE_SHIFT; … … 1795 1790 rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->pavHCChunkHC); 1796 1791 AssertMsgReturn(rc == VINF_SUCCESS, ("MMHyperAlloc(,%#x,,,) -> %Vrc\n", cbRam, cb), rc); 1797 1798 pNew->pavHCChunkGC = MMHyperHC2GC(pVM, pNew->pavHCChunkHC);1799 Assert(pNew->pavHCChunkGC);1800 1792 1801 1793 /* Physical memory will be allocated on demand. */ -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r12932 r13038 553 553 { 554 554 pVM->pgm.s.apGstPaePDsHC[i] = 0; 555 pVM->pgm.s.apGstPaePDsGC[i] = 0; 555 pVM->pgm.s.apGstPaePDsGC[i] = 0; 556 556 pVM->pgm.s.aGCPhysGstPaePDs[i] = NIL_RTGCPHYS; 557 557 } … … 798 798 if (Pde.n.u1Present) 799 799 { 800 if ( !Pde.b.u1Size 800 if ( !Pde.b.u1Size 801 801 # if PGM_GST_TYPE != PGM_TYPE_AMD64 802 802 || !(pState->cr4 & X86_CR4_PSE) -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r13035 r13038 893 893 { 894 894 unsigned iChunk = (off >> PGM_DYNAMIC_CHUNK_SHIFT); 895 #if defined(IN_GC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) /* ASSUMES this is a rare occurence */ 896 PRTR3PTR paChunkR3Ptrs = (PRTR3PTR)MMHyperR3ToCC(pVM, pRam->pavHCChunkHC); 897 *pHCPtr = paChunkR3Ptrs[iChunk] + (off & PGM_DYNAMIC_CHUNK_OFFSET_MASK); 898 #else 895 899 *pHCPtr = (RTHCPTR)((RTHCUINTPTR)CTXSUFF(pRam->pavHCChunk)[iChunk] + (off & PGM_DYNAMIC_CHUNK_OFFSET_MASK)); 900 #endif 896 901 } 897 902 else if (RT_LIKELY(pRam->pvR3)) -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r13037 r13038 170 170 VMMR0DECL(int) PGMR0DynMapGCPage(PVM pVM, RTGCPHYS GCPhys, void **ppv) 171 171 { 172 Assert(!(GCPhys & PAGE_OFFSET ));172 Assert(!(GCPhys & PAGE_OFFSET_MASK)); 173 173 return VERR_NOT_IMPLEMENTED; 174 174 }
Note:
See TracChangeset
for help on using the changeset viewer.