Changeset 7657 in vbox
- Timestamp:
- Mar 31, 2008 1:26:24 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29167
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMGst.h
r6764 r7657 30 30 #undef GST_BIG_PAGE_OFFSET_MASK 31 31 #undef GST_PDE_PG_MASK 32 #undef GST_PDE 4M_PG_MASK32 #undef GST_PDE_BIG_PG_MASK 33 33 #undef GST_PD_SHIFT 34 34 #undef GST_PD_MASK … … 49 49 # define GST_BIG_PAGE_OFFSET_MASK X86_PAGE_4M_OFFSET_MASK 50 50 # define GST_PDE_PG_MASK X86_PDE_PG_MASK 51 # define GST_PDE 4M_PG_MASKX86_PDE4M_PG_MASK51 # define GST_PDE_BIG_PG_MASK X86_PDE4M_PG_MASK 52 52 # define GST_PD_SHIFT X86_PD_SHIFT 53 53 # define GST_PD_MASK X86_PD_MASK … … 67 67 # define GST_BIG_PAGE_OFFSET_MASK X86_PAGE_2M_OFFSET_MASK 68 68 # define GST_PDE_PG_MASK X86_PDE_PAE_PG_MASK 69 # define GST_PDE 4M_PG_MASK X86_PDE4M_PAE_PG_MASK69 # define GST_PDE_BIG_PG_MASK X86_PDE2M_PAE_PG_MASK 70 70 # define GST_PD_SHIFT X86_PD_PAE_SHIFT 71 71 # define GST_PD_MASK X86_PD_PAE_MASK -
trunk/src/VBox/VMM/PGMMap.cpp
r7629 r7657 465 465 * 466 466 * @remark This API shall not be used to anything but mapping the switcher code. 467 */467 z */ 468 468 PGMR3DECL(int) PGMR3MapIntermediate(PVM pVM, RTUINTPTR Addr, RTHCPHYS HCPhys, unsigned cbPages) 469 469 { … … 734 734 return; 735 735 736 Assert(PGMGetGuestMode(pVM) <= PGMMODE_32_BIT); 737 736 738 /* 737 739 * Init the page tables and insert them into the page directories. … … 954 956 if (pVM->pgm.s.fMappingsFixed) 955 957 return false; 958 959 Assert(PGMGetGuestMode(pVM) <= PGMMODE_32_BIT); 956 960 957 961 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r7656 r7657 242 242 if ( PdeSrc.b.u1Size 243 243 && (cr4 & X86_CR4_PSE)) 244 GCPhys = (PdeSrc.u & GST_PDE 4M_PG_MASK)244 GCPhys = (PdeSrc.u & GST_PDE_BIG_PG_MASK) 245 245 | ((RTGCPHYS)pvFault & (GST_BIG_PAGE_OFFSET_MASK ^ PAGE_OFFSET_MASK)); 246 246 else … … 908 908 /* Before freeing the page, check if anything really changed. */ 909 909 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); 910 RTGCPHYS GCPhys = PdeSrc.u & GST_PDE 4M_PG_MASK;910 RTGCPHYS GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 911 911 # if PGM_SHW_TYPE != PGM_TYPE_32BIT 912 912 GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT); … … 1273 1273 else 1274 1274 { 1275 GCPhys = PdeSrc.u & GST_PDE 4M_PG_MASK;1275 GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 1276 1276 # if PGM_SHW_TYPE != PGM_TYPE_32BIT 1277 1277 GCPhys |= GCPtrPage & X86_PAGE_2M_SIZE; … … 1388 1388 */ 1389 1389 /* Calculate the GC physical address of this 4KB shadow page. */ 1390 RTGCPHYS GCPhys = (PdeSrc.u & GST_PDE 4M_PG_MASK) | ((RTGCUINTPTR)GCPtrPage & GST_BIG_PAGE_OFFSET_MASK);1390 RTGCPHYS GCPhys = (PdeSrc.u & GST_PDE_BIG_PG_MASK) | ((RTGCUINTPTR)GCPtrPage & GST_BIG_PAGE_OFFSET_MASK); 1391 1391 /* Find ram range. */ 1392 1392 PPGMPAGE pPage; … … 1908 1908 else 1909 1909 { 1910 GCPhys = PdeSrc.u & GST_PDE 4M_PG_MASK;1910 GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 1911 1911 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1912 1912 GCPhys |= GCPtrPage & RT_BIT(X86_PAGE_2M_SHIFT); … … 2666 2666 else 2667 2667 { 2668 GCPhys = PdeSrc.u & GST_PDE 4M_PG_MASK;2668 GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 2669 2669 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 2670 2670 GCPhys |= i * X86_PAGE_2M_SIZE; … … 2996 2996 continue; 2997 2997 } 2998 GCPhysGst = PdeSrc.u & GST_PDE 4M_PG_MASK;2998 GCPhysGst = PdeSrc.u & GST_PDE_BIG_PG_MASK; 2999 2999 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3000 3000 GCPhysGst |= GCPtr & RT_BIT(X86_PAGE_2M_SHIFT); -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r7655 r7657 31 31 #undef GST_BIG_PAGE_OFFSET_MASK 32 32 #undef GST_PDE_PG_MASK 33 #undef GST_PDE 4M_PG_MASK33 #undef GST_PDE_BIG_PG_MASK 34 34 #undef GST_PD_SHIFT 35 35 #undef GST_PD_MASK … … 52 52 # define GST_BIG_PAGE_OFFSET_MASK X86_PAGE_4M_OFFSET_MASK 53 53 # define GST_PDE_PG_MASK X86_PDE_PG_MASK 54 # define GST_PDE 4M_PG_MASKX86_PDE4M_PG_MASK54 # define GST_PDE_BIG_PG_MASK X86_PDE4M_PG_MASK 55 55 # define GST_PD_SHIFT X86_PD_SHIFT 56 56 # define GST_PD_MASK X86_PD_MASK … … 72 72 # define GST_BIG_PAGE_OFFSET_MASK X86_PAGE_2M_OFFSET_MASK 73 73 # define GST_PDE_PG_MASK X86_PDE_PAE_PG_MASK 74 # define GST_PDE 4M_PG_MASKX86_PDE2M_PAE_PG_MASK74 # define GST_PDE_BIG_PG_MASK X86_PDE2M_PAE_PG_MASK 75 75 # define GST_PD_SHIFT X86_PD_PAE_SHIFT 76 76 # define GST_PD_MASK X86_PD_PAE_MASK … … 203 203 | ((Pde.u & X86_PDE4M_PAT) >> X86_PDE4M_PAT_SHIFT); 204 204 if (pGCPhys) 205 *pGCPhys = (Pde.u & GST_PDE 4M_PG_MASK) | (GCPtr & (~GST_PDE4M_PG_MASK ^ ~GST_PTE_PG_MASK)); /** @todo pse36 */205 *pGCPhys = (Pde.u & GST_PDE_BIG_PG_MASK) | (GCPtr & (~GST_PDE_BIG_PG_MASK ^ ~GST_PTE_PG_MASK)); /** @todo pse36 */ 206 206 } 207 207 return VINF_SUCCESS; … … 289 289 * 4MB Page table 290 290 */ 291 Pde.u = (Pde.u & (fMask | ((fMask & X86_PTE_PAT) << X86_PDE4M_PAT_SHIFT) | GST_PDE 4M_PG_MASK | X86_PDE4M_PS)) /** @todo pse36 */291 Pde.u = (Pde.u & (fMask | ((fMask & X86_PTE_PAT) << X86_PDE4M_PAT_SHIFT) | GST_PDE_BIG_PG_MASK | X86_PDE4M_PS)) /** @todo pse36 */ 292 292 | (fFlags & ~GST_PTE_PG_MASK) 293 293 | ((fFlags & X86_PTE_PAT) << X86_PDE4M_PAT_SHIFT);
Note:
See TracChangeset
for help on using the changeset viewer.