Changeset 104848 in vbox for trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
- Timestamp:
- Jun 5, 2024 9:38:20 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r100359 r104848 50 50 #include <iprt/param.h> 51 51 #include <iprt/process.h> 52 #include <iprt/string.h> 52 53 #include "internal/memobj.h" 53 54 #include "memobj-r0drv-solaris.h" … … 1213 1214 } 1214 1215 1216 1217 DECLHIDDEN(int) rtR0MemObjNativeZeroInitWithoutMapping(PRTR0MEMOBJINTERNAL pMem) 1218 { 1219 PRTR0MEMOBJSOL const pMemSolaris = (PRTR0MEMOBJSOL)pMem; 1220 size_t const cPages = pMemSolaris->Core.cb >> PAGE_SHIFT; 1221 size_t iPage; 1222 for (iPage = 0; iPage < cPages; iPage++) 1223 { 1224 void *pvPage; 1225 1226 /* Get the physical address of the page. */ 1227 RTHCPHYS const HCPhys = rtR0MemObjNativeGetPagePhysAddr(&pMemSolaris->Core, iPage); 1228 AssertReturn(HCPhys != NIL_RTHCPHYS, VERR_INTERNAL_ERROR_3); 1229 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 1230 1231 /* Map it. */ 1232 HCPhys >>= PAGE_SHIFT; 1233 AssertReturn(HCPhys <= physmax, VERR_INTERNAL_ERROR_3); 1234 pvPage = hat_kpm_pfn2va(HCPhys); 1235 AssertPtrReturn(pvPage, VERR_INTERNAL_ERROR_3); 1236 1237 /* Zero it. */ 1238 RT_BZERO(pvPage, PAGE_SIZE); 1239 } 1240 return VINF_SUCCESS; 1241 } 1242
Note:
See TracChangeset
for help on using the changeset viewer.