Changeset 29027 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- May 4, 2010 2:33:41 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/memobj.h
r28800 r29027 188 188 bool fAllocated; 189 189 /** See RTMEM_CACHE_POLICY_XXX constants */ 190 u nsignedCachePolicy;190 uint32_t uCachePolicy; 191 191 } Phys; 192 192 … … 385 385 * @param Phys The physical address to start at, page aligned. 386 386 * @param cb The size of the object in bytes, page aligned. 387 * @param CachePolicyOne of the RTMEM_CACHE_XXX modes.388 */ 389 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy);387 * @param uCachePolicy One of the RTMEM_CACHE_XXX modes. 388 */ 389 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy); 390 390 391 391 /** -
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r28800 r29027 604 604 605 605 606 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)607 { 608 AssertReturn( CachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED);606 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 607 { 608 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED); 609 609 610 610 /* … … 635 635 pMemDarwin->Core.u.Phys.PhysBase = Phys; 636 636 pMemDarwin->Core.u.Phys.fAllocated = false; 637 pMemDarwin->Core.u.Phys.uCachePolicy = uCachePolicy; 637 638 pMemDarwin->pMemDesc = pMemDesc; 638 639 *ppMem = &pMemDarwin->Core; -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r28777 r29027 496 496 497 497 498 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)499 { 500 AssertReturn( CachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED);498 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 499 { 500 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED); 501 501 502 502 /* create the object. */ … … 508 508 pMemFreeBSD->Core.u.Phys.fAllocated = false; 509 509 pMemFreeBSD->Core.u.Phys.PhysBase = Phys; 510 pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; 510 511 *ppMem = &pMemFreeBSD->Core; 511 512 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r28800 r29027 743 743 744 744 745 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)745 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 746 746 { 747 747 /* … … 759 759 pMemLnx->Core.u.Phys.PhysBase = PhysAddr; 760 760 pMemLnx->Core.u.Phys.fAllocated = false; 761 pMemLnx->Core.u.Phys. CachePolicy =CachePolicy;761 pMemLnx->Core.u.Phys.uCachePolicy = uCachePolicy; 762 762 Assert(!pMemLnx->cPages); 763 763 *ppMem = &pMemLnx->Core; … … 1166 1166 */ 1167 1167 Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated); 1168 pMemLnx->Core.pv = (pMemLnxToMap->Core.u.Phys.CachePolicy == RTMEM_CACHE_POLICY_MMIO)1169 1170 1168 pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO 1169 ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase, pMemLnxToMap->Core.cb) 1170 : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase, pMemLnxToMap->Core.cb); 1171 1171 if (pMemLnx->Core.pv) 1172 1172 { -
trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
r28800 r29027 661 661 * nearest page boundrary. 662 662 * @param cb The size of the object in bytes. This is rounded up to nearest page boundrary. 663 * @param CachePolicyOne of the RTMEM_CACHE_XXX modes.664 */ 665 RTR0DECL(int) RTR0MemObjEnterPhys(PRTR0MEMOBJ pMemObj, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)663 * @param uCachePolicy One of the RTMEM_CACHE_XXX modes. 664 */ 665 RTR0DECL(int) RTR0MemObjEnterPhys(PRTR0MEMOBJ pMemObj, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 666 666 { 667 667 /* sanity checks. */ … … 673 673 AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER); 674 674 AssertReturn(Phys != NIL_RTHCPHYS, VERR_INVALID_PARAMETER); 675 AssertReturn( uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE 676 || uCachePolicy == RTMEM_CACHE_POLICY_MMIO, 677 VERR_INVALID_PARAMETER); 675 678 RT_ASSERT_PREEMPTIBLE(); 676 679 677 680 /* do the allocation. */ 678 return rtR0MemObjNativeEnterPhys(pMemObj, PhysAligned, cbAligned, CachePolicy);681 return rtR0MemObjNativeEnterPhys(pMemObj, PhysAligned, cbAligned, uCachePolicy); 679 682 } 680 683 RT_EXPORT_SYMBOL(RTR0MemObjEnterPhys); -
trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
r28800 r29027 484 484 485 485 486 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)487 { 488 AssertReturn( CachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED);486 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 487 { 488 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED); 489 489 490 490 /* … … 503 503 pMemNt->Core.u.Phys.PhysBase = Phys; 504 504 pMemNt->Core.u.Phys.fAllocated = false; 505 pMemNt->Core.u.Phys.uCachePolicy = uCachePolicy; 505 506 *ppMem = &pMemNt->Core; 506 507 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
r28777 r29027 231 231 232 232 233 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)234 { 235 AssertReturn( CachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED);233 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 234 { 235 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED); 236 236 237 237 /* create the object. */ … … 243 243 pMemOs2->Core.u.Phys.fAllocated = false; 244 244 pMemOs2->Core.u.Phys.PhysBase = Phys; 245 pMemOs2->Core.u.Phys.uCachePolicy = uCachePolicy; 245 246 *ppMem = &pMemOs2->Core; 246 247 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/memobj-r0drv-solaris.c
r28800 r29027 267 267 268 268 269 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, u nsignedCachePolicy)270 { 271 AssertReturn( CachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED);269 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) 270 { 271 AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_IMPLEMENTED); 272 272 273 273 /* Create the object. */ … … 279 279 pMemSolaris->Core.u.Phys.fAllocated = false; 280 280 pMemSolaris->Core.u.Phys.PhysBase = Phys; 281 pMemSolaris->Core.u.Phys.uCachePolicy = uCachePolicy; 281 282 *ppMem = &pMemSolaris->Core; 282 283 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.