|
ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IOBigMemoryCursor |
| Inherits from: | |
| Declared In: |
An IOMemoryCursor subclass that outputs a vector of PhysicalSegments in the big endian byte order.
The IOBigMemoryCursor would be used when the DMA hardware requires a big endian address and length pair. This cursor outputs an array of PhysicalSegments that are encoded in big-endian format.
Generates a big endian physical scatter/gather list given a memory descriptor.
Primary initializer for the IOBigMemoryCursor class.
Outputs the given segment into the output segments array in big endian byte order.
Creates and initializes an IOBigMemoryCursor in one operation.
getPhysicalSegments |
Generates a big endian physical scatter/gather list given a memory descriptor.
public
virtual UInt32 getPhysicalSegments( IOMemoryDescriptor *descriptor, IOByteCount fromPosition, PhysicalSegment *segments, UInt32 maxSegments, UInt32 maxTransferSize = 0, IOByteCount *transferSize = 0)
descriptorIOMemoryDescriptor that describes the data associated with an I/O request.
fromPositionStarting location of the I/O within a memory descriptor.
segmentsPointer to an array of IOMemoryCursor::PhysicalSegments for the output physical scatter/gather list.
maxSegmentsMaximum number of segments that can be written to segments array.
maxTransferSizeMaximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized.
transferSizePointer to an IOByteCount variable that can contain the total size of the transfer being described. Defaults to 0 indicating that no transfer size need be returned.
If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned.
Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor. Wraps IOMemoryCursor::genPhysicalSegments.
initWithSpecification |
Primary initializer for the IOBigMemoryCursor class.
public
virtual bool initWithSpecification( IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1);
maxSegmentSizeMaximum allowable size for one segment. Defaults to 0.
maxTransferSizeMaximum size of an entire transfer. Defaults to 0 indicating no maximum.
alignmentAlignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
Returns true if the inherited classes and this instance initialize successfully.
outputSegment |
Outputs the given segment into the output segments array in big endian byte order.
public
static void outputSegment( PhysicalSegment segment, void *segments, UInt32 segmentIndex);
segmentThe physical address and length that is next to be output.
segmentsBase of the output vector of DMA address length pairs.
segmentIndexIndex to output 'segment' in the 'segments' array.
withSpecification |
Creates and initializes an IOBigMemoryCursor in one operation.
public
static IOBigMemoryCursor * withSpecification( IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1);
maxSegmentSizeMaximum allowable size for one segment. Defaults to 0.
maxTransferSizeMaximum size of an entire transfer. Defaults to 0 indicating no maximum.
alignmentAlignment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
Returns a new memory cursor if successfully created and initialized, 0 otherwise.
Factory function to create and initialize an IOBigMemoryCursor in one operation. See also IOBigMemoryCursor::initWithSpecification.
bigOutputSegment |
#define bigOutputSegment IOBigMemoryCursor::outputSegment
Backward compatibility define for the old global function definition. See IOBigMemoryCursor::outputSegment
|
Last Updated: 2008-12-19