Lines Matching defs:ref
263 ExpansionData * ref = (ExpansionData *) device_handle;
267 memDesc = ref->memory;
291 ExpansionData * ref = (ExpansionData *) device_handle;
293 IODelete( ref, ExpansionData, 1 );
1033 // memEntry holds a ref on the device pager which owns reserved
2348 IOMemoryDescriptorMapAllocRef * ref = (IOMemoryDescriptorMapAllocRef *)_ref;
2352 if( ref->sharedMem)
2355 | ((ref->options & kIOMapReadOnly) ? 0 : VM_PROT_WRITE);
2358 if (kIOMapDefaultCache != (ref->options & kIOMapCacheMask))
2363 switch (ref->options & kIOMapCacheMask)
2390 memEntryCacheMode, NULL, ref->sharedMem );
2395 &ref->mapped,
2396 ref->size, 0 /* mask */,
2397 (( ref->options & kIOMapAnywhere ) ? VM_FLAGS_ANYWHERE : VM_FLAGS_FIXED)
2399 ref->sharedMem, ref->sourceOffset,
2406 ref->mapped = 0;
2413 err = mach_vm_allocate( map, &ref->mapped, ref->size,
2414 ((ref->options & kIOMapAnywhere) ? VM_FLAGS_ANYWHERE : VM_FLAGS_FIXED)
2417 ref->mapped = 0;
2421 err = vm_inherit( map, ref->mapped, ref->size, VM_INHERIT_NONE);
2436 IOMemoryDescriptorMapAllocRef ref;
2438 ref.sharedMem = entry;
2439 ref.sourceOffset = trunc_page_64(offset);
2440 ref.options = options;
2442 ref.size = length;
2446 ref.mapped = 0;
2448 ref.mapped = *address;
2450 if( ref.sharedMem && (map == kernel_map) && pageable)
2451 err = IOIteratePageableMaps( ref.size, &IOMemoryDescriptorMapAlloc, &ref );
2453 err = IOMemoryDescriptorMapAlloc( map, &ref );
2455 *address = ref.mapped;