withAddress

Create an IOMemoryDescriptor to describe one virtual range of the kernel task.

Declaration

static IOMemoryDescriptor * withAddress(
 void *address, 
 IOByteCountwithLength, 
 IODirectionwithDirection); 

Parameters

address

The virtual address of the first byte in the memory.

withLength

The length of memory.

withDirection

An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.

Return Value

The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure.

Overview

This method creates and initializes an IOMemoryDescriptor for memory consisting of a single virtual memory range mapped into the kernel map. This memory descriptor needs to be prepared before it can be used to extract data from the memory described.

See Also

Miscellaneous

- complete

Complete processing of the memory after an I/O transfer finishes.

- createMappingInTask

Maps a IOMemoryDescriptor into a task.

- getDirection

Accessor to get the direction the memory descriptor was created with.

- getLength

Accessor to get the length of the memory descriptor (over all its ranges).

- getPageCounts

Retrieve the number of resident and/or dirty pages encompassed by an IOMemoryDescriptor.

- getPhysicalAddress

Return the physical address of the first byte in the memory.

- getPhysicalSegment

Break a memory descriptor into its physically contiguous segments.

- getTag

Accessor to the retrieve the tag for the memory descriptor.

- initWithOptions

Master initialiser for all variants of memory descriptors. For a more complete description see IOMemoryDescriptor::withOptions.

- map

Maps a IOMemoryDescriptor into the kernel map.

- performOperation

Perform an operation on the memory descriptor's memory.

- prepare

Prepare the memory for an I/O transfer.

- readBytes

Copy data from the memory descriptor's buffer to the specified buffer.

- setMapping

Establishes an already existing mapping.

- setPurgeable

Control the purgeable status of a memory descriptors memory.

- setTag

Set the tag for the memory descriptor.

- withAddressRange

Create an IOMemoryDescriptor to describe one virtual range of the specified map.

- withAddressRanges

Create an IOMemoryDescriptor to describe one or more virtual ranges.

- withOptions

Master initialiser for all variants of memory descriptors.

- withPersistentMemoryDescriptor

Copy constructor that generates a new memory descriptor if the backing memory for the same task's virtual address and length has changed.

- withPhysicalAddress

Create an IOMemoryDescriptor to describe one physical range.

- writeBytes

Copy data to the memory descriptor's buffer from the specified buffer.