Changeset 81705 in vbox
- Timestamp:
- Nov 6, 2019 11:58:44 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pgm.h
r81624 r81705 732 732 VMMR3_INT_DECL(int) PGMR3PhysMMIOExReduce(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, RTGCPHYS cbRegion); 733 733 VMMR3_INT_DECL(int) PGMR3PhysMmio2ValidateHandle(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2); 734 VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysM MIOExGetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2);734 VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysMmio2GetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2); 735 735 VMMR3_INT_DECL(int) PGMR3PhysMMIOExChangeRegionNo(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev, uint32_t iRegion, PGMMMIO2HANDLE hMmio2, uint32_t iNewRegion); 736 736 VMMR3DECL(bool) PGMR3PhysMMIOExIsBase(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys); -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r81691 r81705 691 691 VM_ASSERT_EMT0_RETURN(pVM, NIL_RTGCPHYS); 692 692 693 RTGCPHYS GCPhys = PGMR3PhysM MIOExGetMappingAddress(pVM, pDevIns, hRegion);693 RTGCPHYS GCPhys = PGMR3PhysMmio2GetMappingAddress(pVM, pDevIns, hRegion); 694 694 695 695 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: returns %RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys)); -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r81624 r81705 3856 3856 3857 3857 /** 3858 * Gets the mapping address of an MMIO2 handle.3859 *3860 * @returns The mapping address, NIL_RTGCPHYS if not mapped of invalid input.3861 * @param pVM The cross context VM structure.3862 * @param pVM The cross context VM structure.3863 * @param pDevIns The device instance owning the region.3864 * @param hMmio2 The handle of the region.3865 */3866 VMMR3DECL(bool) PGMR3PhysMMIO2GetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys)3867 {3868 /*3869 * Validate input3870 */3871 VM_ASSERT_EMT_RETURN(pVM, false);3872 AssertPtrReturn(pDevIns, false);3873 AssertReturn(GCPhys != NIL_RTGCPHYS, false);3874 AssertReturn(GCPhys != 0, false);3875 AssertReturn(!(GCPhys & PAGE_OFFSET_MASK), false);3876 3877 /*3878 * Search the list.3879 */3880 pgmLock(pVM);3881 for (PPGMREGMMIO2RANGE pCurMmio = pVM->pgm.s.pRegMmioRangesR3; pCurMmio; pCurMmio = pCurMmio->pNextR3)3882 if (pCurMmio->RamRange.GCPhys == GCPhys)3883 {3884 Assert(pCurMmio->fFlags & PGMREGMMIO2RANGE_F_MAPPED);3885 bool fRet = RT_BOOL(pCurMmio->fFlags & PGMREGMMIO2RANGE_F_FIRST_CHUNK);3886 pgmUnlock(pVM);3887 return fRet;3888 }3889 pgmUnlock(pVM);3890 return false;3891 }3892 3893 3894 /**3895 3858 * Checks if the given address is an MMIO2 or pre-registered MMIO base address 3896 3859 * or not. … … 4026 3989 4027 3990 /** 4028 * Changes the region number of an MMIO2 or pre-registered MMIO region. 4029 * 4030 * This is only for dealing with save state issues, nothing else. 4031 * 4032 * @return VBox status code. 3991 * Gets the mapping address of an MMIO2 region. 3992 * 3993 * @returns Mapping address, NIL_RTGCPHYS if not mapped or invalid handle. 4033 3994 * 4034 3995 * @param pVM The cross context VM structure. 4035 * @param pDevIns The device owning the MMIO2 memory. 4036 * @param iSubDev The sub-device number. Pass UINT32_MAX if @a hMmio2 is 4037 * given. 4038 * @param iRegion The region. Pass UINT32_MAX if @a hMmio2 is given. 4039 * @param hMmio2 The handle of the region to map as an alternative to 4040 * @a iSubDev and @a iRegion, pass NIL to use the 4041 * other two. 4042 * @param iNewRegion The new region index. 4043 * 4044 * @thread EMT(0) 4045 * @sa @bugref{9359} 4046 */ 4047 VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysMMIOExGetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2) 3996 * @param pDevIns The device owning the MMIO2 handle. 3997 * @param hMmio2 The region handle. 3998 */ 3999 VMMR3_INT_DECL(RTGCPHYS) PGMR3PhysMmio2GetMappingAddress(PVM pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2) 4048 4000 { 4049 4001 AssertPtrReturn(pDevIns, NIL_RTGCPHYS);
Note:
See TracChangeset
for help on using the changeset viewer.