ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOAGPDevice

Inherits from:
Declared In:

Overview

An IOService class representing an AGP master device.

Discussion

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.



Functions

commitAGPMemory

Makes memory addressable by AGP transactions.

createAGPSpace

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

destroyAGPSpace

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

getAGPRangeAllocator

Accessor to obtain the AGP range allocator.

getAGPSpace

Returns the allocated AGP space.

getAGPStatus

Returns the current state of the AGP bus.

releaseAGPMemory

Releases memory addressable by AGP transactions.


commitAGPMemory


Makes memory addressable by AGP transactions.

public

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

An 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.

public

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.

public

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.

public

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.

public

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.

public

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.

public

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.

Structs and Unions


ExpansionData


protected

struct ExpansionData { };
Discussion

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

Member Data


reserved


protected

ExpansionData *reserved;
Discussion

Reserved for future use. (Internal use only)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19