public:
virtual UInt32 configRead32( UInt8 offset );
This method reads a 32-bit configuration space register on the device and returns its value.
Result: An 32-bit value in host byte order (big endian on PPC).
Name Description offset An 8-bit offset into configuration space, of which bits 0-1 are ignored.
public:
virtual void configWrite32( UInt8 offset, UInt32 data );
This method write a 32-bit value to a configuration space register on the device.
Name Description offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. data An 32-bit value to be written in host byte order (big endian on PPC).
public:
virtual UInt32 findPCICapability( UInt8 capabilityID );
This method searchs the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities.
Result: The 32-bit value of the capability register if one was found, zero otherwise.
Name Description capabilityID An 8-bit PCI capability ID.
public:
virtual UInt8 getBusNumber( void );
This method is an accessor to return the PCI device's assigned bus number.
Result: The 8-bit value of device's PCI bus number.public:
virtual IODeviceMemory * getDeviceMemoryWithRegister( UInt8 reg );
This method will return a pointer to an instance of IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in. It is analogous to IOService::getDeviceMemoryWithIndex.
Result: A pointer to an instance of IODeviceMemory, or zero no such range was found. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller.
Name Description reg The 8-bit configuration space register that is the base address register for the desired range.
public:
virtual UInt8 getDeviceNumber( void );
This method is an accessor to return the PCI device's device number.
Result: The 5-bit value of device's device number.public:
virtual UInt8 getFunctionNumber( void );
This method is an accessor to return the PCI device's function number.
Result: The 3-bit value of device's function number.public:
virtual IODeviceMemory * ioDeviceMemory( void );
This method will return a reference to the IODeviceMemory for the I/O aperture of the bus the device is on.
Result: A pointer to an IODeviceMemory object for the I/O aperture. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller.public:
virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 );
This method will read a 16-bit value from a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Result: The value read in host byte order (big endian on PPC).
Name Description offset An offset into a bus or device's I/O space aperture. map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 );
This method will read a 32-bit value from a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Result: The value read in host byte order (big endian on PPC).
Name Description offset An offset into a bus or device's I/O space aperture. map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 );
This method will read a 8-bit value from an offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Result: The value read.
Name Description offset An offset into a bus or device's I/O space aperture. map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual void ioWrite16( UInt16 offset, UInt16 value, IOMemoryMap * map = 0 );
This method will write a 16-bit value to a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Name Description offset An offset into a bus or device's I/O space aperture. value The value to be written in host byte order (big endian on PPC). map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual void ioWrite32( UInt16 offset, UInt32 value, IOMemoryMap * map = 0 );
This method will write a 32-bit value to a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Name Description offset An offset into a bus or device's I/O space aperture. value The value to be written in host byte order (big endian on PPC). map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual void ioWrite8( UInt16 offset, UInt8 value, IOMemoryMap * map = 0 );
This method will write a 8-bit value to an offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
Name Description offset An offset into a bus or device's I/O space aperture. value The value to be written in host byte order (big endian on PPC). map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
public:
virtual IOMemoryMap * mapDeviceMemoryWithRegister( UInt8 reg, IOOptionBits options = 0 );
This method will create a mapping for the IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in, with IODeviceMemory::map(options). The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. This method is analogous to IOService::mapDeviceMemoryWithIndex.
Result: An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required.
Name Description index An index into the array of ranges assigned to the device.
public:
virtual bool setBusMasterEnable( bool enable );
This method sets the bus master enable bit in the device's command config space register to the passed value, and returns the previous state of the enable.
Result: True if bus mastering was previously enabled, false otherwise.
Name Description enable True or false to enable or disable bus mastering.
public:
virtual UInt32 setConfigBits( UInt8 offset, UInt32 mask, UInt32 value );
This method sets masked bits in a configuration space register on the device by reading and writing the register. The value of the masked bits before the write is returned.
Result: The value of the register masked with the mask before the write.
Name Description offset An 8-bit offset into configuration space, of which bits 0-1 are ignored. mask An 32-bit mask indicating which bits in the value parameter are valid. data An 32-bit value to be written in host byte order (big endian on PPC).
public:
virtual bool setIOEnable( bool enable, bool exclusive = false );
This method sets the I/O space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. The exclusive option allows only one exclusive device on the bus to be enabled concurrently, this should be only for temporary access.
Result: True if the I/O space response was previously enabled, false otherwise.
Name Description enable True or false to enable or disable the I/O space response. exclusive If true, only one setIOEnable with the exclusive flag set will be allowed at a time on the bus, this should be only for temporary access.
public:
virtual bool setMemoryEnable( bool enable );
This method sets the memory space response bit in the device's command config space register to the passed value, and returns the previous state of the enable.
Result: True if the memory space response was previously enabled, false otherwise.
Name Description enable True or false to enable or disable the memory space response.
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)