Lines Matching refs:address

143 	vm_offset_t address;  member
214 gIOKitPageableSpace.maps[0].address = gIOKitPageableFixedRanges[0].min_address; in IOLibInit()
299 void * address; variable
308 address = kheap_alloc(kheap, allocSize,
311 if (address) {
315 hdr = (typeof(hdr))address;
317 hdr->tracking.address = ~(((uintptr_t) address) + sizeofIOLibMallocHeader);
322 address = (typeof(address))(((uintptr_t) address) + sizeofIOLibMallocHeader);
330 return address;
336 void * address; in IOFree_internal() local
338 if ((address = inAddress)) { in IOFree_internal()
339 address = (typeof(address))(((uintptr_t) address) - sizeofIOLibMallocHeader); in IOFree_internal()
351 hdr = (typeof(hdr))address; in IOFree_internal()
362 kheap_free(kheap, address, size + sizeofIOLibMallocHeader); in IOFree_internal()
461 mach_vm_address_t address = 0; in IOMallocAlignedHdrCorruptionPanic() local
464 if (os_sub_overflow(alignedStart, offset, &address)) { in IOMallocAlignedHdrCorruptionPanic()
468 if (os_add3_overflow(address, sizeofIOLibPageMallocHeader, alignMask, in IOMallocAlignedHdrCorruptionPanic()
492 mach_vm_address_t address = 0; in IOMallocAlignedGetAddress() local
502 if (os_sub_overflow(alignedStart, offset, &address) || in IOMallocAlignedGetAddress()
503 os_add3_overflow(address, sizeofIOLibPageMallocHeader, alignMask, in IOMallocAlignedGetAddress()
511 return address; in IOMallocAlignedGetAddress()
519 vm_offset_t address; variable
546 address = 0; /* overflow detected */
548 kr = kernel_memory_allocate(kernel_map, &address,
551 address = 0;
555 IOTrackingAlloc(gIOMallocTracking, address, size);
573 address = (allocationAddress + alignMask + sizeofIOLibPageMallocHeader)
576 hdr = (typeof(hdr))(address - sizeofIOLibPageMallocHeader);
577 IOMallocAlignedSetHdr(hdr, alignMask, allocationAddress, address);
581 hdr->tracking.address = ~address;
587 address = 0;
591 assert(0 == (address & alignMask));
593 if (address) {
600 return (void *) address;
604 IOFreeAligned_internal(kalloc_heap_t kheap, void * address, vm_size_t size) in IOFreeAligned_internal() argument
610 if (!address) { in IOFreeAligned_internal()
620 IOTrackingFree(gIOMallocTracking, (uintptr_t) address, size); in IOFreeAligned_internal()
623 kmem_free(kernel_map, (vm_offset_t) address, size); in IOFreeAligned_internal()
625 hdr = (typeof(hdr))(((uintptr_t)address) - sizeofIOLibPageMallocHeader); in IOFreeAligned_internal()
627 (mach_vm_address_t)address, &adjustedSize); in IOFreeAligned_internal()
666 void * address, in IOFreeAligned() argument
669 IOFreeAligned_internal(KHEAP_DATA_BUFFERS, address, size); in IOFreeAligned()
679 mach_vm_address_t address, in IOKernelFreePhysical() argument
686 if (!address) { in IOKernelFreePhysical()
696 IOTrackingFree(gIOMallocTracking, address, size); in IOKernelFreePhysical()
699 kmem_free(kernel_map, (vm_offset_t) address, size); in IOKernelFreePhysical()
701 hdr = (typeof(hdr))(((uintptr_t)address) - sizeofIOLibPageMallocHeader); in IOKernelFreePhysical()
702 allocationAddress = IOMallocAlignedGetAddress(hdr, address, &adjustedSize); in IOKernelFreePhysical()
730 mach_vm_address_t address; in IOKernelAllocateWithPhysicalRestrict() local
786 address = virt; in IOKernelAllocateWithPhysicalRestrict()
789 IOTrackingAlloc(gIOMallocTracking, address, size); in IOKernelAllocateWithPhysicalRestrict()
793 address = 0; in IOKernelAllocateWithPhysicalRestrict()
808 address = (allocationAddress + alignMask + sizeofIOLibPageMallocHeader) in IOKernelAllocateWithPhysicalRestrict()
811 if (atop_32(address) != atop_32(address + size - 1)) { in IOKernelAllocateWithPhysicalRestrict()
812 address = round_page(address); in IOKernelAllocateWithPhysicalRestrict()
815 hdr = (typeof(hdr))(address - sizeofIOLibPageMallocHeader); in IOKernelAllocateWithPhysicalRestrict()
816 IOMallocAlignedSetHdr(hdr, alignMask, allocationAddress, address); in IOKernelAllocateWithPhysicalRestrict()
820 hdr->tracking.address = ~address; in IOKernelAllocateWithPhysicalRestrict()
826 address = 0; in IOKernelAllocateWithPhysicalRestrict()
830 if (address) { in IOKernelAllocateWithPhysicalRestrict()
837 return address; in IOKernelAllocateWithPhysicalRestrict()
854 mach_vm_address_t address = 0; in IOMallocContiguous() local
865 address = IOKernelAllocateWithPhysicalRestrict(KHEAP_DEFAULT, in IOMallocContiguous()
895 address = (mach_vm_address_t) entry->virtualAddr; in IOMallocContiguous()
900 return (void *) address; in IOMallocContiguous()
909 mach_vm_address_t address = (mach_vm_address_t) _address; in IOFreeContiguous() local
911 if (!address) { in IOFreeContiguous()
921 if (entry->virtualAddr == address) { in IOFreeContiguous()
934 IOKernelFreePhysical(KHEAP_DEFAULT, (mach_vm_address_t) address, size); in IOFreeContiguous()
1013 gIOKitPageableSpace.maps[index].address = min; in IOIteratePageableMaps()
1025 vm_offset_t address; member
1036 return kmem_alloc( map, &ref->address, ref->size, flags, ref->tag ); in IOMallocPageableCallback()
1056 ref.address = 0; in IOMallocPageablePages()
1059 return (void *) ref.address; in IOMallocPageablePages()
1063 IOPageableMapForAddress( uintptr_t address ) in IOPageableMapForAddress() argument
1069 if ((address >= gIOKitPageableSpace.maps[index].address) in IOPageableMapForAddress()
1070 && (address < gIOKitPageableSpace.maps[index].end)) { in IOPageableMapForAddress()
1083 IOFreePageablePages(void * address, vm_size_t size) in IOFreePageablePages() argument
1087 map = IOPageableMapForAddress((vm_address_t) address); in IOFreePageablePages()
1089 kmem_free( map, (vm_offset_t) address, size); in IOFreePageablePages()
1153 IOFreePageable(void * address, vm_size_t size) in IOFreePageable() argument
1162 address = (void *) iopa_free(&gIOPageablePageAllocator, (uintptr_t) address, size); in IOFreePageable()
1165 if (address) { in IOFreePageable()
1166 IOFreePageablePages(address, size); in IOFreePageable()
1172 if (address) { in IOFreePageable()
1173 IOFreePageablePages(address, size); in IOFreePageable()
1199 IOFreeData(void * address, vm_size_t size) in IOFreeData() argument
1201 return IOFree_internal(KHEAP_DATA_BUFFERS, address, size); in IOFreeData()
1239 IOFreeTypeImpl(kalloc_type_view_t kt_view, void * address) in IOFreeTypeImpl() argument
1243 return IOFree_internal(KHEAP_DEFAULT, address, in IOFreeTypeImpl()
1252 return kfree_type_impl_external(kt_view, address); in IOFreeTypeImpl()
1275 IOFreeTypeVarImpl(kalloc_type_var_view_t kt_view, void * address, in IOFreeTypeVarImpl() argument
1280 return IOFree_internal(KHEAP_DEFAULT, address, size); in IOFreeTypeVarImpl()
1284 return kfree_type_var_impl(kt_view, address, size); in IOFreeTypeVarImpl()
1452 IOSetProcessorCacheMode( task_t task, IOVirtualAddress address, in IOSetProcessorCacheMode() argument
1461 if ((address | length) & PAGE_MASK) { in IOSetProcessorCacheMode()
1465 length = round_page(address + length) - trunc_page( address ); in IOSetProcessorCacheMode()
1466 address = trunc_page( address ); in IOSetProcessorCacheMode()
1473 pagenum = pmap_find_phys(kernel_pmap, (addr64_t)address); in IOSetProcessorCacheMode()
1475 ret = IOUnmapPages( get_task_map(task), address, page_size ); in IOSetProcessorCacheMode()
1476 ret = IOMapPages( get_task_map(task), address, ptoa_64(pagenum), page_size, cacheMode ); in IOSetProcessorCacheMode()
1481 address += page_size; in IOSetProcessorCacheMode()
1490 IOFlushProcessorCache( task_t task, IOVirtualAddress address, in IOFlushProcessorCache() argument
1497 flush_dcache64((addr64_t) address, (unsigned) length, false ); in IOFlushProcessorCache()