Mac Developer Library

Developer

IOAGPDevice Class Reference

Options
Deployment Target:

On This Page
Language:

IOAGPDevice

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.0 and later.

An IOService class representing an AGP master device.

The discovery of an AGP master device by the PCI bus family results in an instance of the IOAGPDevice being created and published. It provides services specific to AGP, in addition to the PCI services supplied by its superclass IOPCIDevice.

  • Makes memory addressable by AGP transactions.

    Declaration

    C++

    virtual IOReturn commitAGPMemory( IOMemoryDescriptor *memory, IOByteCount agpOffset, IOOptionBits options = 0 );

    Parameters

    memory

    A IOMemoryDescriptor object describing the memory to add to the GART.

    agpOffset

    An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator.

    options

    Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB.

    Return Value

    Returns an IOReturn code indicating success or failure.

    Discussion

    Makes the memory described by the IOMemoryDescriptor object addressable by AGP by entering its pages into the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to prepare non-kernel pageable memory before calling this method, with IOMemoryDescriptor::prepare.

  • Allocates the AGP space, and enables AGP transactions on the master and slave.

    Declaration

    C++

    virtual IOReturn createAGPSpace( IOOptionBitsoptions, IOPhysicalAddress *address, IOPhysicalLength *length );

    Parameters

    options

    No options are currently defined, pass zero.

    address

    The physical range allocated for the AGP space is passed back to the caller.

    length

    An in/out parameter - the caller sets the devices maximum AGP addressing and the actual size created is passed back.

    Return Value

    Returns an IOReturn code indicating success or failure.

    Discussion

    This method should be called by the driver for the AGP master device to set the size of the space and enable AGP transactions. It will destroy any AGP space currently allocated.

  • Destroys the AGP space, and disables AGP transactions on the master and slave.

    Declaration

    C++

    virtual IOReturn destroyAGPSpace( void );

    Discussion

    This method should be called by the driver to shutdown AGP transactions and release resources.

  • Accessor to obtain the AGP range allocator.

    Declaration

    C++

    virtual IORangeAllocator * getAGPRangeAllocator( void );

    Return Value

    Returns a pointer to the range allocator for the AGP space.

    Discussion

    To allocate ranges in AGP space, obtain a range allocator for the space with this method. It is retained while the space is created (until destroyAGPSpace is called) and should not be released by the caller.

  • Returns the allocated AGP space.

    Declaration

    C++

    virtual IOReturn getAGPSpace( IOPhysicalAddress *address, IOPhysicalLength *length );

    Parameters

    address

    The physical range allocated for the AGP space is passed back to the caller. Zero may be passed if the address is not needed by the caller.

    length

    The size of the the AGP space created is passed back. Zero may be passed if the length is not needed by the caller.

    Return Value

    Returns an IOReturn code indicating success or failure.

    Discussion

    This method can be called by the driver for the AGP master device to retrieve the physical address and size of the space created with createAGPSpace.

  • Returns the current state of the AGP bus.

    Declaration

    C++

    virtual IOOptionBits getAGPStatus( IOOptionBits which = which );

    Parameters

    which

    Type of status - only kIOAGPDefaultStatus is currently valid.

    Return Value

    Returns mask of status bits for the AGP bus.

    Discussion

    Returns state bits for the AGP bus. Only one type of status is currently defined.

  • Releases memory addressable by AGP transactions.

    Declaration

    C++

    virtual IOReturn releaseAGPMemory( IOMemoryDescriptor *memory, IOByteCount agpOffset, IOOptionBits options = 0 );

    Parameters

    memory

    A IOMemoryDescriptor object describing the memory to remove from the GART.

    agpOffset

    An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator.

    options

    Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB.

    Return Value

    Returns an IOReturn code indicating success or failure.

    Discussion

    Makes the memory described by the IOMemoryDescriptor object unaddressable by AGP by removing its pages from the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It is the caller's responsibility to complete non-kernel pageable memory before calling this method, with IOMemoryDescriptor::complete.

Data Types

  • Declaration

    C++

    struct ExpansionData { };

    Discussion

    This structure will be used to expand the capablilties of the IOWorkLoop in the future.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData *reserved;