Functions



getPhysicalSegments

Abstract: Generate a DBDMA physical scatter/gather list given a memory descriptor.
public:

virtual UInt32 getPhysicalSegments(IOMemoryDescriptor * descriptor, IOByteCount fromPosition, IODBDMADescriptor * segments, UInt32 maxSegments, UInt32 maxTransferSize = 0, IOByteCount * transferSize = 0) { return genPhysicalSegments(descriptor, fromPosition, segments, maxSegments, maxTransferSize, transferSize);

Generates a list of DBDMA descriptors where the address and length fields are filled in appropriately. But the client is expected to fill in the rest of teh DBDMA descriptor as is appropriate for their particular hardware. Wraps $link IOMemoryCursor::genPhysicalSegments.

Parameters

NameDescription
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 DBDMA descriptors for the output physical scatter/gather list. Be warned no room is left for a preamble in the output array. 'segments' should point to the first memory description slot in a DBDMA command.
maxSegmentsMaximum number of segments that can be written to the dbdma descriptor table.
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 a IOByteCount variable that can contain the total size of the transfer being described. Default to 0 indicating that no transfer size need be returned.
Result: If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned.

initWithSpecification

Abstract: Primary initialiser for the IODBDMAMemoryCursor class.
public:

virtual bool initWithSpecification(IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1);

Parameters

NameDescription
maxSegmentSizeMaximum allowable size for one segment. Defaults to 0.
maxTransferSizeMaximum size of an entire transfer. Default to 0 indicating no maximum.
alignmentAlligment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
Result: true if the inherited classes and this instance initialise successfully.

withSpecification

Abstract: Factory function to create and initialise an IODBDMAMemoryCursor in one operation, see $link IODBDMAMemoryCursor::initWithSpecification.
public:

static IODBDMAMemoryCursor * withSpecification(IOPhysicalLength maxSegmentSize, IOPhysicalLength maxTransferSize, IOPhysicalLength alignment = 1);

Parameters

NameDescription
maxSegmentSizeMaximum allowable size for one segment. Defaults to 0.
maxTransferSizeMaximum size of an entire transfer. Default to 0 indicating no maximum.
alignmentAlligment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
Result: A new memory cursor if successfully created and initialised, 0 otherwise.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)