Changeset 13035 in vbox for trunk/src/VBox/VMM/PGMPhys.cpp
- Timestamp:
- Oct 7, 2008 9:54:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMPhys.cpp
r12989 r13035 98 98 pNew->pNextR3 = pRam; 99 99 pNew->pNextR0 = pRam ? MMHyperCCToR0(pVM, pRam) : NIL_RTR0PTR; 100 pNew->pNext GC = pRam ? MMHyperCCToRC(pVM, pRam) : NIL_RTGCPTR;100 pNew->pNextRC = pRam ? MMHyperCCToRC(pVM, pRam) : NIL_RTRCPTR; 101 101 102 102 if (pPrev) … … 104 104 pPrev->pNextR3 = pNew; 105 105 pPrev->pNextR0 = MMHyperCCToR0(pVM, pNew); 106 pPrev->pNext GC = MMHyperCCToRC(pVM, pNew);106 pPrev->pNextRC = MMHyperCCToRC(pVM, pNew); 107 107 } 108 108 else … … 110 110 pVM->pgm.s.pRamRangesR3 = pNew; 111 111 pVM->pgm.s.pRamRangesR0 = MMHyperCCToR0(pVM, pNew); 112 pVM->pgm.s.pRamRanges GC = MMHyperCCToRC(pVM, pNew);112 pVM->pgm.s.pRamRangesRC = MMHyperCCToRC(pVM, pNew); 113 113 } 114 114 … … 135 135 pPrev->pNextR3 = pNext; 136 136 pPrev->pNextR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR; 137 pPrev->pNext GC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR;137 pPrev->pNextRC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTRCPTR; 138 138 } 139 139 else … … 142 142 pVM->pgm.s.pRamRangesR3 = pNext; 143 143 pVM->pgm.s.pRamRangesR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR; 144 pVM->pgm.s.pRamRanges GC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR;144 pVM->pgm.s.pRamRangesRC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTRCPTR; 145 145 } 146 146 … … 244 244 pNew->fFlags = 0; 245 245 246 pNew->pv HC= NULL;246 pNew->pvR3 = NULL; 247 247 pNew->pavHCChunkHC = NULL; 248 248 pNew->pavHCChunkGC = 0; … … 343 343 } 344 344 else 345 ASMMemZero32((char *)pRam->pv HC+ (iPage << PAGE_SHIFT), PAGE_SIZE);345 ASMMemZero32((char *)pRam->pvR3 + (iPage << PAGE_SHIFT), PAGE_SIZE); 346 346 break; 347 347 #else /* VBOX_WITH_NEW_PHYS_CODE */ … … 489 489 pNew->fFlags = 0; /* Some MMIO flag here? */ 490 490 491 pNew->pv HC= NULL;491 pNew->pvR3 = NULL; 492 492 pNew->pavHCChunkHC = NULL; 493 493 pNew->pavHCChunkGC = 0; … … 701 701 //pNew->RamRange.fFlags = 0; 702 702 703 pNew->RamRange.pv HC = pvPages; ///@todo remove this704 pNew->RamRange.pavHCChunkHC = NULL; ///@todo remove this 705 pNew->RamRange.pavHCChunkGC = 0; ///@todo remove this 703 pNew->RamRange.pvR3 = pvPages; ///@todo remove this [new phys code] 704 pNew->RamRange.pavHCChunkHC = NULL; ///@todo remove this [new phys code] 705 pNew->RamRange.pavHCChunkGC = 0; ///@todo remove this [new phys code] 706 706 707 707 uint32_t iPage = cPages; … … 1253 1253 pRamNew->cb = cb; 1254 1254 pRamNew->fFlags = 0; 1255 pRamNew->pv HC= NULL;1255 pRamNew->pvR3 = NULL; 1256 1256 1257 1257 PPGMPAGE pPage = &pRamNew->aPages[0]; … … 1344 1344 pRomNew->pNextR3 = pRom; 1345 1345 pRomNew->pNextR0 = pRom ? MMHyperCCToR0(pVM, pRom) : NIL_RTR0PTR; 1346 pRomNew->pNextGC = pRom ? MMHyperCCToRC(pVM, pRom) : NIL_RT GCPTR;1346 pRomNew->pNextGC = pRom ? MMHyperCCToRC(pVM, pRom) : NIL_RTRCPTR; 1347 1347 1348 1348 if (pRomPrev) … … 1729 1729 size_t cbRam = RT_OFFSETOF(PGMRAMRANGE, aPages[cb >> PAGE_SHIFT]); 1730 1730 PPGMRAMRANGE pNew; 1731 RT GCPTR GCPtrNew;1731 RTRCPTR RCPtrNew; 1732 1732 int rc = VERR_NO_MEMORY; 1733 1733 if (cbRam > PAGE_SIZE / 2) … … 1737 1737 if (VBOX_SUCCESS(rc)) 1738 1738 { 1739 RTGCPTR GCPtrNew; 1739 1740 rc = MMR3HyperMapHCRam(pVM, pNew, cbRam, true, 1740 1741 MMR3HeapAPrintf(pVM, MM_TAG_PGM_PHYS, "ram range (%s)", pszDesc), … … 1742 1743 if (VBOX_SUCCESS(rc)) 1743 1744 { 1744 Assert(MMHyperHC2GC(pVM, pNew) == GCPtrNew); 1745 RCPtrNew = GCPtrNew; 1746 Assert(MMHyperR3ToRC(pVM, pNew) == GCPtrNew && RCPtrNew == GCPtrNew); 1745 1747 rc = MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 1746 1748 } … … 1760 1762 rc = MMHyperAlloc(pVM, cbRam, 16, MM_TAG_PGM, (void **)&pNew); 1761 1763 if (VBOX_SUCCESS(rc)) 1762 GCPtrNew = MMHyperHC2GC(pVM, pNew);1764 RCPtrNew = MMHyperR3ToRC(pVM, pNew); 1763 1765 else 1764 1766 AssertMsgFailed(("MMHyperAlloc(,%#x,,,) -> %Vrc\n", cbRam, cb)); … … 1769 1771 * Initialize the range. 1770 1772 */ 1771 pNew->pv HC= pvRam;1773 pNew->pvR3 = pvRam; 1772 1774 pNew->GCPhys = GCPhys; 1773 1775 pNew->GCPhysLast = GCPhysLast; … … 1821 1823 pNew->pNextR3 = pCur; 1822 1824 pNew->pNextR0 = pCur ? MMHyperCCToR0(pVM, pCur) : NIL_RTR0PTR; 1823 pNew->pNext GC = pCur ? MMHyperCCToRC(pVM, pCur) : NIL_RTGCPTR;1825 pNew->pNextRC = pCur ? MMHyperCCToRC(pVM, pCur) : NIL_RTRCPTR; 1824 1826 if (pPrev) 1825 1827 { 1826 1828 pPrev->pNextR3 = pNew; 1827 1829 pPrev->pNextR0 = MMHyperCCToR0(pVM, pNew); 1828 pPrev->pNext GC = GCPtrNew;1830 pPrev->pNextRC = RCPtrNew; 1829 1831 } 1830 1832 else … … 1832 1834 pVM->pgm.s.pRamRangesR3 = pNew; 1833 1835 pVM->pgm.s.pRamRangesR0 = MMHyperCCToR0(pVM, pNew); 1834 pVM->pgm.s.pRamRanges GC = GCPtrNew;1836 pVM->pgm.s.pRamRangesRC = RCPtrNew; 1835 1837 } 1836 1838 pgmUnlock(pVM); … … 1888 1890 * Find existing range location. 1889 1891 */ 1890 PPGMRAMRANGE pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);1892 PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 1891 1893 while (pRam) 1892 1894 { … … 1896 1898 break; 1897 1899 1898 pRam = CTXALLSUFF(pRam->pNext);1900 pRam = pRam->CTX_SUFF(pNext); 1899 1901 } 1900 1902 AssertReturn(pRam, VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS); … … 1933 1935 pgmLock(pVM); 1934 1936 1935 PPGMRAMRANGE pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);1937 PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 1936 1938 while (pRam) 1937 1939 { … … 1953 1955 } 1954 1956 1955 pRam = CTXALLSUFF(pRam->pNext);1957 pRam = pRam->CTX_SUFF(pNext); 1956 1958 } 1957 1959 pgmUnlock(pVM); … … 2068 2070 * Lookup the range. 2069 2071 */ 2070 PPGMRAMRANGE pRam = CTXALLSUFF(pVM->pgm.s.pRamRanges);2072 PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRanges); 2071 2073 while (pRam && GCPhys > pRam->GCPhysLast) 2072 pRam = CTXALLSUFF(pRam->pNext);2074 pRam = pRam->CTX_SUFF(pNext); 2073 2075 if ( !pRam 2074 2076 || GCPhys > pRam->GCPhysLast
Note:
See TracChangeset
for help on using the changeset viewer.