Changeset 91481 in vbox for trunk/src/VBox/Runtime/r0drv/haiku
- Timestamp:
- Sep 30, 2021 12:06:31 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/haiku/memobj-r0drv-haiku.c
r91480 r91481 152 152 153 153 154 static int rtR0MemObjNativeAllocArea(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, 155 bool fExecutable, RTR0MEMOBJTYPE type, RTHCPHYS PhysHighest, size_t uAlignment)154 static int rtR0MemObjNativeAllocArea(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, RTR0MEMOBJTYPE enmType, 155 RTHCPHYS PhysHighest, size_t uAlignment, const char *pszTag) 156 156 { 157 157 NOREF(fExecutable); … … 162 162 uint32 addressSpec = B_ANY_KERNEL_ADDRESS; 163 163 uint32 fLock = ~0U; 164 LogFlowFunc(("ppMem=%p cb=%u, fExecutable=%s, type=%08x, PhysHighest=%RX64 uAlignment=%u\n", ppMem,(unsigned)cb,165 fExecutable ? "true" : "false", type, PhysHighest,(unsigned)uAlignment));166 167 switch ( type)164 LogFlowFunc(("ppMem=%p cb=%u, fExecutable=%s, enmType=%08x, PhysHighest=%RX64 uAlignment=%u\n", ppMem,(unsigned)cb, 165 fExecutable ? "true" : "false", enmType, PhysHighest,(unsigned)uAlignment)); 166 167 switch (enmType) 168 168 { 169 169 case RTR0MEMOBJTYPE_PAGE: … … 204 204 /* Create the object. */ 205 205 PRTR0MEMOBJHAIKU pMemHaiku; 206 pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), type, NULL, cb, NULL);206 pMemHaiku = (PRTR0MEMOBJHAIKU)rtR0MemObjNew(sizeof(RTR0MEMOBJHAIKU), enmType, NULL, cb, pszTag); 207 207 if (RT_UNLIKELY(!pMemHaiku)) 208 208 return VERR_NO_MEMORY; … … 213 213 physical_entry physMap[2]; 214 214 pMemHaiku->Core.pv = pvMap; /* store start address */ 215 switch ( type)215 switch (enmType) 216 216 { 217 217 case RTR0MEMOBJTYPE_CONT: … … 250 250 int rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 251 251 { 252 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_PAGE, 0 /* PhysHighest */, 0 /* uAlignment */ );252 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_PAGE, 0 /* PhysHighest */, 0 /* uAlignment */, NULL); 253 253 } 254 254 … … 263 263 int rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 264 264 { 265 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_LOW, 0 /* PhysHighest */, 0 /* uAlignment */ );265 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_LOW, 0 /* PhysHighest */, 0 /* uAlignment */, NULL); 266 266 } 267 267 … … 269 269 int rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) 270 270 { 271 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_CONT, 0 /* PhysHighest */, 0 /* uAlignment */ );272 } 273 274 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment )275 { 276 return rtR0MemObjNativeAllocArea(ppMem, cb, false, RTR0MEMOBJTYPE_PHYS, PhysHighest, uAlignment );277 } 278 279 280 int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest )281 { 282 return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest, PAGE_SIZE );271 return rtR0MemObjNativeAllocArea(ppMem, cb, fExecutable, RTR0MEMOBJTYPE_CONT, 0 /* PhysHighest */, 0 /* uAlignment */, NULL); 272 } 273 274 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment, const char *pszTag) 275 { 276 return rtR0MemObjNativeAllocArea(ppMem, cb, false, RTR0MEMOBJTYPE_PHYS, PhysHighest, uAlignment, pszTag); 277 } 278 279 280 int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, const char *pszTag) 281 { 282 return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest, PAGE_SIZE, pszTag); 283 283 } 284 284
Note:
See TracChangeset
for help on using the changeset viewer.