IOAGPDevice

Inherits from
IOPCIDevice
Availability
Available in OS X v10.0 and later.
Declared in
IOAGPDevice.h

Overview

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.

Tasks

Miscellaneous

Instance Methods

commitAGPMemory

Makes memory addressable by AGP transactions.

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.

createAGPSpace

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

virtual IOReturn createAGPSpace( IOOptionBits options, 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.

destroyAGPSpace

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

virtual IOReturn destroyAGPSpace( void );
Discussion

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

getAGPRangeAllocator

Accessor to obtain the AGP range allocator.

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.

getAGPSpace

Returns the allocated AGP space.

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.

getAGPStatus

Returns the current state of the AGP bus.

virtual IOOptionBits getAGPStatus( IOOptionBits which = kIOAGPDefaultStatus );
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.

releaseAGPMemory

Releases memory addressable by AGP transactions.

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.

ExpansionData

struct ExpansionData {
};
Discussion

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

Instance Variables

reserved

ExpansionData *reserved;

Reserved for future use. (Internal use only)