Changeset 13071 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Oct 8, 2008 12:07:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r13067 r13071 1767 1767 VMMDECL(int) PGMDynMapGCPage(PVM pVM, RTGCPHYS GCPhys, void **ppv) 1768 1768 { 1769 AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("GCPhys=% VGp\n", GCPhys));1769 AssertMsg(!(GCPhys & PAGE_OFFSET_MASK), ("GCPhys=%RGp\n", GCPhys)); 1770 1770 1771 1771 /* … … 1777 1777 if (!pRam) 1778 1778 { 1779 AssertMsgFailed(("Invalid physical address % VGp!\n", GCPhys));1779 AssertMsgFailed(("Invalid physical address %RGp!\n", GCPhys)); 1780 1780 return VERR_PGM_INVALID_GC_PHYSICAL_ADDRESS; 1781 1781 } … … 1823 1823 */ 1824 1824 RTHCPHYS HCPhys = PGM_PAGE_GET_HCPHYS(&pRam->aPages[(GCPhys - pRam->GCPhys) >> PAGE_SHIFT]); 1825 return PGMDynMapHCPageOff(pVM, HCPhys, ppv); 1825 int rc = PGMDynMapHCPhys(pVM, HCPhys, ppv); 1826 if (RT_SUCCESS(rc)) 1827 *ppv = (void *)((uintptr_t)*ppv | (GCPhys & PAGE_OFFSET_MASK)); 1828 return rc; 1826 1829 } 1827 1830 … … 1836 1839 * @param pVM VM handle. 1837 1840 * @param HCPhys HC Physical address of the page. 1838 * @param ppv Where to store the address of the mapping. 1841 * @param ppv Where to store the address of the mapping. This is the 1842 * address of the PAGE not the exact address corresponding 1843 * to HCPhys. Use PGMDynMapHCPageOff if you care for the 1844 * page offset. 1839 1845 */ 1840 1846 VMMDECL(int) PGMDynMapHCPage(PVM pVM, RTHCPHYS HCPhys, void **ppv) 1841 1847 { 1842 AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=% VHp\n", HCPhys));1848 AssertMsg(!(HCPhys & PAGE_OFFSET_MASK), ("HCPhys=%RHp\n", HCPhys)); 1843 1849 # ifdef IN_GC 1844 1850 … … 1913 1919 VMMDECL(int) PGMDynMapHCPageOff(PVM pVM, RTHCPHYS HCPhys, void **ppv) 1914 1920 { 1915 int rc = PGMDynMapHCPage(pVM, HCPhys , ppv);1921 int rc = PGMDynMapHCPage(pVM, HCPhys & ~(RTHCPHYS)PAGE_OFFSET_MASK, ppv); 1916 1922 if (RT_SUCCESS(rc)) 1917 1923 *ppv = (void *)((uintptr_t)*ppv | (HCPhys & PAGE_OFFSET_MASK));
Note:
See TracChangeset
for help on using the changeset viewer.