• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/iokit/Kernel/

Lines Matching refs:offset

80 	memory_object_offset_t	offset,
142 uint32_t fIOMDOffset; // The offset of this iopl in descriptor
184 vm_object_offset_t offset,
197 offset, size, kIOMapDefaultCache /*?*/);
350 UInt32 offset,
358 && !self->initWithOptions(buffers, count, offset, task, opts, mapper))
369 UInt32 offset,
397 IOByteCount offset,
401 return (IOSubMemoryDescriptor::withSubRange(of, offset, length, direction | kIOMemoryThreadSafe));
586 UInt32 offset,
753 _pages += atop_32(offset + count + PAGE_MASK) - atop_32(offset);
760 if (upl_get_size(iopl.fIOPL) < (count + offset))
768 // Pre-compute the offset into the UPL's page list
769 pageList = &pageList[atop_32(offset)];
770 offset &= PAGE_MASK;
775 iopl.fPageOffset = offset;
1011 IOMemoryDescriptor::getSourceSegment( IOByteCount offset, IOByteCount * length )
1016 physAddr = getPhysicalSegment64( offset, length );
1020 return( (IOPhysicalAddress) physAddr ); // truncated but only page offset is used
1025 (IOByteCount offset, void *bytes, IOByteCount length)
1031 assert(offset < _length);
1032 assert(offset + length <= _length);
1033 if (offset >= _length) {
1040 remaining = length = min(length, _length - offset);
1045 srcAddr64 = getPhysicalSegment(offset, &srcLen, kIOMemoryMapperNone);
1057 offset += srcLen;
1070 (IOByteCount offset, const void *bytes, IOByteCount length)
1076 assert(offset < _length);
1077 assert(offset + length <= _length);
1081 if ( (kIOMemoryPreparedReadOnly & _flags) || offset >= _length) {
1088 remaining = length = min(length, _length - offset);
1093 dstAddr64 = getPhysicalSegment(offset, &dstLen, kIOMemoryMapperNone);
1105 offset += dstLen;
1314 UInt offset = isP->fIO.fOffset;
1337 if (offset >= _length)
1338 return (offset == _length)? kIOReturnOverrun : kIOReturnInternalError;
1340 // Validate the previous offset
1343 && offset
1344 && (offset == isP->fNextOffset || off2Ind <= offset))
1358 // Find the range after the one that contains the offset
1360 for (len = 0; off2Ind <= offset; ind++) {
1366 length = off2Ind - offset;
1372 address = dataP->fMappedBase + offset;
1395 // Find the range after the one that contains the offset
1397 for (len = 0; off2Ind <= offset; ind++) {
1403 length = off2Ind - offset;
1409 address = dataP->fMappedBase + offset;
1439 // Scan through iopl info blocks looking for block containing offset
1440 while (ind < numIOPLs && offset >= ioplList[ind].fIOMDOffset)
1451 length -= offset; // Remainder within iopl
1453 // Subtract offset till this iopl in total list
1454 offset -= off2Ind;
1457 // then just need to compute an offset relative to the mapped base.
1459 offset += (ioplInfo.fPageOffset & PAGE_MASK);
1460 address = trunc_page_64(dataP->fMappedBase) + ptoa_64(ioplInfo.fMappedPage) + offset;
1464 // The offset is rebased into the current iopl.
1465 // Now add the iopl 1st page offset.
1466 offset += ioplInfo.fPageOffset;
1477 address = ptoa_64(pageList->phys_addr) + offset;
1482 UInt pageInd = atop_32(offset);
1483 offset &= PAGE_MASK;
1491 address = ptoa_64(pageAddr) + offset;
1496 IOByteCount contigLength = PAGE_SIZE - offset;
1523 IOGeneralMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment, IOOptionBits options)
1534 if (offset >= _length)
1537 // IOMemoryDescriptor::doMap() cannot use getPhysicalSegment() to obtain the page offset, since it must
1551 if (offset < length)
1553 offset -= length; // (make offset relative)
1559 addr += offset;
1560 length -= offset;
1579 state->fOffset = offset;
1580 state->fLength = _length - offset;
1586 DEBG("getPhysicalSegment dmaCommandOperation(%lx), %p, offset %qx, addr %qx, len %qx\n",
1627 IOMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment, IOOptionBits options)
1633 address = getSourceSegment(offset, lengthOfSegment);
1637 address = getPhysicalSegment64(offset, lengthOfSegment);
1641 address = getPhysicalSegment(offset, lengthOfSegment);
1648 IOGeneralMemoryDescriptor::getPhysicalSegment64(IOByteCount offset, IOByteCount *lengthOfSegment)
1650 return (getPhysicalSegment(offset, lengthOfSegment, kIOMemoryMapperNone));
1654 IOGeneralMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment)
1659 address = getPhysicalSegment(offset, lengthOfSegment, 0);
1674 IOMemoryDescriptor::getPhysicalSegment64(IOByteCount offset, IOByteCount *lengthOfSegment)
1681 phys32 = getPhysicalSegment(offset, lengthOfSegment);
1710 IOMemoryDescriptor::getPhysicalSegment(IOByteCount offset, IOByteCount *lengthOfSegment)
1712 return ((IOPhysicalAddress) getPhysicalSegment(offset, lengthOfSegment, 0));
1716 IOGeneralMemoryDescriptor::getSourceSegment(IOByteCount offset, IOByteCount *lengthOfSegment)
1718 return ((IOPhysicalAddress) getPhysicalSegment(offset, lengthOfSegment, _kIOMemorySourceSegment));
1721 void * IOGeneralMemoryDescriptor::getVirtualSegment(IOByteCount offset,
1725 return (void *) getSourceSegment(offset, lengthOfSegment);
1758 IOByteCount offset = (IOByteCount) data->fOffset;
1762 data->fIOVMAddr = md->getPhysicalSegment(offset, &length);
1764 data->fIOVMAddr = md->getPhysicalSegment(offset, &length, kIOMemoryMapperNone);
2003 IOByteCount offset, IOByteCount length )
2033 remaining = length = min(length, getLength() - offset);
2040 dstAddr64 = getPhysicalSegment(offset, &dstLen, kIOMemoryMapperNone);
2050 offset += dstLen;
2070 uintptr_t offset,
2089 phys = pmap_find_phys(kernel_pmap, ((addr64_t)offset) + ptoa_64(page));
2373 uint64_t offset,
2397 walkArgs->fOffset = offset + index;
2413 base = mapper->iovmMapMemory(this, offset, pageCount,
2421 walkArgs->fOffset = offset + index;
2449 uint64_t offset,
2462 || offset || (length != _length))
2464 err = super::dmaMap(mapper, mapSpec, offset, length, address, mapPages);
2494 this, offset, _pages, mapOptions, &pageList[0], &mapSpec);
2625 mach_vm_size_t offset = mapping->fOffset + __offset;
2637 if ((offset >= _length) || ((offset + length) > _length))
2646 && (1 == _rangesCount) && (0 == offset)
2700 if (offset < segLen)
2702 offset -= segLen; // (make offset relative)
2713 offset, &address, round_page_64(length + pageOffset));
2717 segLen -= offset;
2718 srcAddr += offset;
2784 pa = getPhysicalSegment( offset, &segLen, kIOMemoryMapperNone );
3048 mach_vm_size_t offset,
3056 ref.sourceOffset = trunc_page_64(offset);
3080 mach_vm_size_t offset,
3088 ref.sourceOffset = trunc_page_64(offset);
3121 mach_vm_size_t offset = mapping->fOffset + __offset;
3132 sourceAddr = getPhysicalSegment( offset, NULL, _kIOMemorySourceSegment );
3192 err = handleFault( pager, mapping->fAddressMap, mapping->fAddress, offset, length, options );
3211 offset, &address, round_page_64(length + pageOffset));
3217 err = handleFault( pager, mapping->fAddressMap, address, offset, length, options );
3224 IOLog("mapping(%x) desc %p @ %qx, map %p, address %qx, offset %qx, length %qx\n",
3225 err, this, (uint64_t)sourceAddr, mapping, address, offset, length);
3684 mach_vm_size_t offset,
3688 mach_vm_address_t start = trunc_page_64(fAddress + offset);
3689 mach_vm_address_t end = round_page_64(fAddress + offset + length);
3770 IOByteCount offset,
3780 options, offset, length));
3788 mach_vm_size_t offset,
3801 options, offset, length )) {
3813 IOLog("createMappingInTask failed desc %p, addr %qx, options %x, offset %qx, length %llx\n",
3814 this, atAddress, (uint32_t) options, offset, length);
3823 IOByteCount offset)
3825 return (redirect(newBackingMemory, options, (mach_vm_size_t)offset));
3831 mach_vm_size_t offset)
3872 offset, fLength))
3912 mach_vm_size_t offset = mapping->fOffset + __offset;
3915 mapping->fOffset = offset;
3939 phys = getPhysicalSegment(offset, &physLen, kIOMemoryMapperNone);
3947 offset = 0;
3948 mapping->fOffset = offset;
3962 result->setMemoryDescriptor(this, offset);
3994 result->setMemoryDescriptor(mapDesc, offset);
4080 void * IOMemoryDescriptor::getVirtualSegment(IOByteCount offset,