Lines Matching refs:offset

217 	vm_object_offset_t      offset,  in device_data_action()  argument
227 kr = memDesc->handleFault(device_pager, offset, size); in device_data_action()
415 int64_t offset; member
511 mach_vm_size_t offset, remain; in memoryReferenceCreate() local
532 offset = 0; in memoryReferenceCreate()
545 nextAddr = getPhysicalSegment(offset, &physLen, kIOMemoryMapperNone); in memoryReferenceCreate()
720 entries->offset = offset + (entryAddr - srcAddr); in memoryReferenceCreate()
726 && (cloneEntries->offset == entries->offset)) { in memoryReferenceCreate()
735 offset += srcLen; in memoryReferenceCreate()
776 entries->offset = offset + (entryAddr - srcAddr); in memoryReferenceCreate()
924 int64_t offset = inoffset; in memoryReferenceMap() local
975 for (remain = offset, rangeIdx = 0; rangeIdx < _rangesCount; rangeIdx++) { in memoryReferenceMap()
985 nextAddr = getPhysicalSegment(offset, &physLen, kIOMemoryMapperNone); in memoryReferenceMap()
1015 (entryIdx < ref->count) && (offset >= ref->entries[entryIdx].offset); in memoryReferenceMap()
1098 while ((ioplIndex < numIOPLs) && (((uint64_t) offset) >= ioplList[ioplIndex].fIOMDOffset)) { in memoryReferenceMap()
1117 mach_vm_size_t offsetInIOPL = offset - ioplInfo.fIOMDOffset + ioplInfo.fPageOffset; in memoryReferenceMap()
1129 entryOffset = offset - entry->offset; in memoryReferenceMap()
1200 offset += chunk - pageOffset; in memoryReferenceMap()
1235 int64_t offset = inoffset; in memoryReferenceMapNew() local
1286 (firstEntryIdx < ref->count) && (offset >= ref->entries[firstEntryIdx].offset); in memoryReferenceMapNew()
1297 int64_t iteroffset = offset; in memoryReferenceMapNew()
1300 entryOffset = iteroffset - entry->offset; in memoryReferenceMapNew()
1307 entryIdx, entry->size, entry->offset, entry->start, iteroffset); in memoryReferenceMapNew()
1409 while ((ioplIndex < numIOPLs) && (((uint64_t) offset) >= ioplList[ioplIndex].fIOMDOffset)) { in memoryReferenceMapNew()
1428 mach_vm_size_t offsetInIOPL = offset - ioplInfo.fIOMDOffset + ioplInfo.fPageOffset; in memoryReferenceMapNew()
1442 printf("offset %qx, %qx\n", offset, entry->offset); in memoryReferenceMapNew()
1450 entryOffset = offset - entry->offset; in memoryReferenceMapNew()
1521 offset += chunk; in memoryReferenceMapNew()
1548 uint64_t * offset) in memoryReferenceGetDMAMapLength() argument
1556 if (offset) { in memoryReferenceGetDMAMapLength()
1557 *offset = (uint64_t) data_offset; in memoryReferenceGetDMAMapLength()
1568 if (offset && !idx) { in memoryReferenceGetDMAMapLength()
1569 *offset = (uint64_t) data_offset; in memoryReferenceGetDMAMapLength()
1575 (offset ? *offset : (vm_object_offset_t)-1), total); in memoryReferenceGetDMAMapLength()
1786 UInt32 offset, in withOptions() argument
1794 && !self->initWithOptions(buffers, count, offset, task, opts, mapper)) { in withOptions()
1804 UInt32 offset, in initWithOptions() argument
1830 IOByteCount offset, in withSubRange() argument
1834 return IOSubMemoryDescriptor::withSubRange(of, offset, length, direction); in withSubRange()
1978 UInt32 offset, in initWithOptions() argument
2154 _pages += atop_32(offset + count + PAGE_MASK) - atop_32(offset); in initWithOptions()
2161 if (upl_get_size(iopl.fIOPL) < (count + offset)) { in initWithOptions()
2166 …DEBUG4K_IOKIT("offset 0x%x task %p options 0x%x -> _highestPage 0x%x\n", (uint32_t)offset, task, (… in initWithOptions()
2172 pageList = &pageList[atop_32(offset)]; in initWithOptions()
2173 offset &= PAGE_MASK; in initWithOptions()
2178 iopl.fPageOffset = offset; in initWithOptions()
2290 …DEBUG4K_IOKIT("offset 0x%x task %p options 0x%x -> _highestPage 0x%x\n", (uint32_t)offset, task, (… in initWithOptions()
2517 IOMemoryDescriptor::getSourceSegment( IOByteCount offset, IOByteCount * length ) in getSourceSegment() argument
2522 physAddr = getPhysicalSegment64( offset, length ); in getSourceSegment()
2535 (IOByteCount offset, void *bytes, IOByteCount length) in readBytes() argument
2543 if ((offset > _length) in readBytes()
2544 || os_add_overflow(length, offset, &endoffset) in readBytes()
2546 …assertf(false, "readBytes exceeds length (0x%lx, 0x%lx) > 0x%lx", (long) offset, (long) length, (l… in readBytes()
2549 if (offset >= _length) { in readBytes()
2562 remaining = length = min(length, _length - offset); in readBytes()
2567 srcAddr64 = getPhysicalSegment(offset, &srcLen, kIOMemoryMapperNone); in readBytes()
2584 offset += srcLen; in readBytes()
2604 IOByteCount offset = inoffset; in writeBytes() local
2609 if ((offset > _length) in writeBytes()
2610 || os_add_overflow(length, offset, &endoffset) in writeBytes()
2618 if (offset >= _length) { in writeBytes()
2631 remaining = length = min(length, _length - offset); in writeBytes()
2636 dstAddr64 = getPhysicalSegment(offset, &dstLen, kIOMemoryMapperNone); in writeBytes()
2656 offset += dstLen; in writeBytes()
2813 for (IOByteCount offset = 0; offset < getLength(); offset += physical_segment.length) { in ktraceEmitPhysicalSegments() local
2814 physical_segment.address = getPhysicalSegment(offset, &physical_segment.length); in ktraceEmitPhysicalSegments()
3122 uint64_t offset = isP->fIO.fOffset; in dmaCommandOperation() local
3165 if (offset >= _length) { in dmaCommandOperation()
3166 return (offset == _length)? kIOReturnOverrun : kIOReturnInternalError; in dmaCommandOperation()
3173 && offset in dmaCommandOperation()
3174 && (offset == isP->fNextOffset || off2Ind <= offset)) { in dmaCommandOperation()
3188 for (len = 0; off2Ind <= offset; ind++) { in dmaCommandOperation()
3194 length = off2Ind - offset; in dmaCommandOperation()
3198 address = mappedBase + offset; in dmaCommandOperation()
3220 for (len = 0; off2Ind <= offset; ind++) { in dmaCommandOperation()
3226 length = off2Ind - offset; in dmaCommandOperation()
3230 address = mappedBase + offset; in dmaCommandOperation()
3261 while (ind < numIOPLs && offset >= ioplList[ind].fIOMDOffset) { in dmaCommandOperation()
3274 length -= offset; // Remainder within iopl in dmaCommandOperation()
3277 offset -= off2Ind; in dmaCommandOperation()
3282 offset += (ioplInfo.fPageOffset & PAGE_MASK); in dmaCommandOperation()
3283 address = trunc_page_64(mappedBase) + ptoa_64(ioplInfo.fMappedPage) + offset; in dmaCommandOperation()
3289 offset += ioplInfo.fPageOffset; in dmaCommandOperation()
3301 address = ptoa_64(pageList->phys_addr) + offset; in dmaCommandOperation()
3306 UInt pageInd = atop_32(offset); in dmaCommandOperation()
3307 offset &= PAGE_MASK; in dmaCommandOperation()
3315 address = ptoa_64(pageAddr) + offset; in dmaCommandOperation()
3320 IOByteCount contigLength = PAGE_SIZE - offset; in dmaCommandOperation()
3347 IOGeneralMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment, IOO… in getPhysicalSegment() argument
3359 if (offset >= _length) { in getPhysicalSegment()
3376 if (offset < length) { in getPhysicalSegment()
3379 offset -= length; // (make offset relative) in getPhysicalSegment()
3385 addr += offset; in getPhysicalSegment()
3386 length -= offset; in getPhysicalSegment()
3405 state->fOffset = offset; in getPhysicalSegment()
3406 state->fLength = _length - offset; in getPhysicalSegment()
3458 IOMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment, IOOptionBi… in getPhysicalSegment() argument
3463 address = getSourceSegment(offset, lengthOfSegment); in getPhysicalSegment()
3465 address = getPhysicalSegment64(offset, lengthOfSegment); in getPhysicalSegment()
3467 address = getPhysicalSegment(offset, lengthOfSegment); in getPhysicalSegment()
3475 IOGeneralMemoryDescriptor::getPhysicalSegment64(IOByteCount offset, IOByteCount *lengthOfSegment) in getPhysicalSegment64() argument
3477 return getPhysicalSegment(offset, lengthOfSegment, kIOMemoryMapperNone); in getPhysicalSegment64()
3481 IOGeneralMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment) in getPhysicalSegment() argument
3486 address = getPhysicalSegment(offset, lengthOfSegment, 0); in getPhysicalSegment()
3501 IOMemoryDescriptor::getPhysicalSegment64(IOByteCount offset, IOByteCount *lengthOfSegment) in getPhysicalSegment64() argument
3508 phys32 = getPhysicalSegment(offset, lengthOfSegment); in getPhysicalSegment64()
3540 IOMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment) in getPhysicalSegment() argument
3542 return (IOPhysicalAddress) getPhysicalSegment(offset, lengthOfSegment, 0); in getPhysicalSegment()
3546 IOGeneralMemoryDescriptor::getSourceSegment(IOByteCount offset, IOByteCount *lengthOfSegment) in getSourceSegment() argument
3548 return (IOPhysicalAddress) getPhysicalSegment(offset, lengthOfSegment, _kIOMemorySourceSegment); in getSourceSegment()
3555 IOGeneralMemoryDescriptor::getVirtualSegment(IOByteCount offset, in getVirtualSegment() argument
3559 return (void *) getSourceSegment(offset, lengthOfSegment); in getVirtualSegment()
3595 IOByteCount offset = (IOByteCount) data->fOffset; in dmaCommandOperation() local
3602 addr = md->getPhysicalSegment(offset, &length, kIOMemoryMapperNone); in dmaCommandOperation()
3603 offset += length; in dmaCommandOperation()
3604 while (offset < getLength()) { in dmaCommandOperation()
3605 nextAddr = md->getPhysicalSegment(offset, &nextLength, kIOMemoryMapperNone); in dmaCommandOperation()
3610 offset += nextLength; in dmaCommandOperation()
3788 IOMemoryDescriptor::getDMAMapLength(uint64_t * offset) in getDMAMapLength() argument
3793 length = IOGeneralMemoryDescriptor::memoryReferenceGetDMAMapLength(_memRef, offset); in getDMAMapLength()
3805 if (offset && !iterate) { in getDMAMapLength()
3806 *offset = sourceAlign; in getDMAMapLength()
3813 if (offset) { in getDMAMapLength()
3814 *offset = 0; in getDMAMapLength()
3893 IOByteCount offset, IOByteCount length ) in performOperation() argument
3958 remaining = length = min(length, getLength() - offset); in performOperation()
3964 dstAddr64 = getPhysicalSegment(offset, &dstLen, kIOMemoryMapperNone); in performOperation()
3995 offset += dstLen; in performOperation()
4040 uintptr_t offset, in io_get_kernel_static_upl() argument
4052 pageCount = atop_32(round_page(*upl_size + (page_mask & offset))); in io_get_kernel_static_upl()
4059 *page_offset = ((unsigned int) page_mask & offset); in io_get_kernel_static_upl()
4062 phys = pmap_find_phys(kernel_pmap, ((addr64_t)offset) + ptoa_64(page)); in io_get_kernel_static_upl()
4288 entryOffset = (entryOffset - memRefEntry->offset); in wireVirtual()
4290 entryOffset = (entryOffset - iopl.fPageOffset - memRefEntry->offset); in wireVirtual()
4483 uint64_t offset, in dmaMap() argument
4497 err = mapper->iovmMapMemory(memory, offset, length, mapOptions, in dmaMap()
4540 uint64_t offset, in dmaUnmap() argument
4586 uint64_t offset, in dmaMap() argument
4604 || offset || (length != _length)) { in dmaMap()
4605 err = super::dmaMap(mapper, memory, command, mapSpec, offset, length, mapAddress, mapLength); in dmaMap()
4643 err = mapper->iovmMapMemory(memory, offset, length, mapOptions, &mapSpec, in dmaMap()
4913 mach_vm_size_t offset = mapping->fOffset + __offset; in doMap() local
4922 if ((offset >= _length) || ((offset + length) > _length)) { in doMap()
4924 …%llx length 0x%llx _length 0x%llx kIOReturnBadArgument\n", __addressMap, offset, length, (uint64_t… in doMap()
4946 && (0 == offset) in doMap()
5020 …err = populateDevicePager( pager, mapping->fAddressMap, mapping->fAddress, offset, length, options… in doMap()
5026 …err = memoryReferenceMap(_memRef, mapping->fAddressMap, offset, length, options, &mapping->fAddres… in doMap()
5031 …err = populateDevicePager(pager, mapping->fAddressMap, mapping->fAddress, offset, length, options); in doMap()
5642 mach_vm_size_t offset, in wireRange() argument
5646 mach_vm_address_t start = trunc_page_64(fAddress + offset); in wireRange()
5647 mach_vm_address_t end = round_page_64(fAddress + offset + length); in wireRange()
5739 IOByteCount offset, in map() argument
5748 options, offset, length); in map()
5757 mach_vm_size_t offset, in createMappingInTask() argument
5771 options, offset, length )) { in createMappingInTask()
5785 this, atAddress, (uint32_t) options, offset, length); in createMappingInTask()
5799 IOByteCount offset) in redirect() argument
5801 return redirect(newBackingMemory, options, (mach_vm_size_t)offset); in redirect()
5808 mach_vm_size_t offset) in redirect() argument
5845 offset, fLength)) { in redirect()
5885 mach_vm_size_t offset = mapping->fOffset + __offset; in makeMapping() local
5888 mapping->fOffset = offset; in makeMapping()
5908 phys = getPhysicalSegment(offset, &physLen, kIOMemoryMapperNone); in makeMapping()
5918 offset = 0; in makeMapping()
5919 mapping->fOffset = offset; in makeMapping()
5929 result->setMemoryDescriptor(this, offset); in makeMapping()
5952 result->setMemoryDescriptor(mapDesc.get(), offset); in makeMapping()
6049 IOMemoryDescriptor::getVirtualSegment(IOByteCount offset, in getVirtualSegment() argument