Changeset 82886 in vbox for trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
- Timestamp:
- Jan 27, 2020 10:26:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r82877 r82886 958 958 { 959 959 /* The kIOMapPrefault option was added in 10.10.0; causes PTEs to be populated with 960 INTEL_PTE_WIRED to be set, just like we desire (see further down). */ 961 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 962 IOMemoryMap *pMemMap = pMemToMapDarwin->pMemDesc->createMappingInTask(kernel_task, 963 0, 964 kIOMapAnywhere | kIOMapDefaultCache | kIOMapPrefault, 965 offSub, 966 cbSub); 967 #elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 960 INTEL_PTE_WIRED to be set, just like we desire (see further down). However, till 961 10.13.0 it was not available for use on kernel mappings. Oh, fudge. */ 962 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 968 963 static uint32_t volatile s_fOptions = UINT32_MAX; 969 964 uint32_t fOptions = s_fOptions; 970 965 if (RT_UNLIKELY(fOptions == UINT32_MAX)) 971 s_fOptions = fOptions = version_major >= 14 ? 0x10000000 /*kIOMapPrefault*/ : 0; /* Since 10.10.0. */ 966 s_fOptions = fOptions = version_major >= 17 ? 0x10000000 /*kIOMapPrefault*/ : 0; /* Since 10.13.0 (High Sierra). */ 967 972 968 IOMemoryMap *pMemMap = pMemToMapDarwin->pMemDesc->createMappingInTask(kernel_task, 973 969 0,
Note:
See TracChangeset
for help on using the changeset viewer.