Changeset 104848 in vbox for trunk/src/VBox/Runtime/r0drv/freebsd
- Timestamp:
- Jun 5, 2024 9:38:20 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r100357 r104848 77 77 #include <iprt/param.h> 78 78 #include <iprt/process.h> 79 #include <iprt/string.h> 79 80 #include "internal/memobj.h" 80 81 … … 906 907 } 907 908 909 910 DECLHIDDEN(int) rtR0MemObjNativeZeroInitWithoutMapping(PRTR0MEMOBJINTERNAL pMem) 911 { 912 PRTR0MEMOBJFREEBSD const pMemFreeBsd = (PRTR0MEMOBJFREEBSD)pMem; 913 size_t const cPages = pMemSolaris->Core.cb >> PAGE_SHIFT; 914 size_t iPage; 915 for (iPage = 0; iPage < cPages; iPage++) 916 { 917 void *pvPage; 918 919 /* Get the physical address of the page. */ 920 RTHCPHYS const HCPhys = rtR0MemObjNativeGetPagePhysAddr(&pMemFreeBsd->Core, iPage); 921 AssertReturn(HCPhys != NIL_RTHCPHYS, VERR_INTERNAL_ERROR_3); 922 Assert(!(HCPhys & PAGE_OFFSET_MASK)); 923 924 /* Map it. */ 925 pvPage = (void *)(uintptr_t)pmap_map(NULL, HCPhys, (HCPhys | PAGE_OFFSET_MASK) + 1, VM_PROT_WRITE | VM_PROT_READ); 926 AssertPtrReturn(pvPage, VERR_INTERNAL_ERROR_3); 927 928 /* Zero it. */ 929 RT_BZERO(pvPage, PAGE_SIZE); 930 } 931 return VINF_SUCCESS; 932 } 933
Note:
See TracChangeset
for help on using the changeset viewer.