Changeset 93616 in vbox for trunk/src/VBox
- Timestamp:
- Feb 6, 2022 8:03:47 AM (3 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
r93515 r93616 3811 3811 int rc2; 3812 3812 if (ppvR3) 3813 { 3814 /* Make sure memory mapped into ring-3 is zero initialized if we can: */ 3815 if ( ppvR0 3816 && !RTR0MemObjWasZeroInitialized(Mem.MemObj)) 3817 { 3818 void *pv = RTR0MemObjAddress(Mem.MemObj); 3819 Assert(pv || !ppvR0); 3820 if (pv) 3821 RT_BZERO(pv, (size_t)cPages * PAGE_SIZE); 3822 } 3823 3813 3824 rc = RTR0MemObjMapUser(&Mem.MapObjR3, Mem.MemObj, (RTR3PTR)-1, 0, RTMEM_PROT_WRITE | RTMEM_PROT_READ, NIL_RTR0PROCESS); 3825 } 3814 3826 else 3815 3827 Mem.MapObjR3 = NIL_RTR0MEMOBJ; -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r93182 r93616 1105 1105 if (RT_SUCCESS(rc)) 1106 1106 { 1107 Assert(ASMMemIsZero(*ppvPages, cPages << PAGE_SHIFT)); 1107 1108 if (!paPages) 1108 1109 paPages = (PSUPPAGE)alloca(sizeof(paPages[0]) * cPages); … … 1135 1136 { 1136 1137 int rc = SUPR3PageAlloc(cPages, 0 /*fFlags*/, ppvPages); 1138 Assert(RT_FAILURE(rc) || ASMMemIsZero(*ppvPages, cPages << PAGE_SHIFT)); 1137 1139 if (pR0Ptr) 1138 1140 *pR0Ptr = NIL_RTR0PTR; … … 1186 1188 *ppvPages = pReq->u.Out.pvR3; 1187 1189 if (pR0Ptr) 1188 *pR0Ptr = pReq->u.Out.pvR0; 1190 { 1191 *pR0Ptr = pReq->u.Out.pvR0; 1192 Assert(ASMMemIsZero(pReq->u.Out.pvR3, cPages << PAGE_SHIFT)); 1193 #ifdef RT_OS_DARWIN /* HACK ALERT! */ 1194 supR3TouchPages(pReq->u.Out.pvR3, cPages); 1195 #endif 1196 } 1197 else 1198 RT_BZERO(pReq->u.Out.pvR3, cPages << PAGE_SHIFT); 1199 1189 1200 if (paPages) 1190 1201 for (size_t iPage = 0; iPage < cPages; iPage++) … … 1194 1205 Assert(!(paPages[iPage].Phys & ~X86_PTE_PAE_PG_MASK)); 1195 1206 } 1196 #ifdef RT_OS_DARWIN /* HACK ALERT! */1197 supR3TouchPages(pReq->u.Out.pvR3, cPages);1198 #endif1199 1207 } 1200 1208 else if ( rc == VERR_NOT_SUPPORTED
Note:
See TracChangeset
for help on using the changeset viewer.