#ifndef _IOKIT_IOFIREWIREBUS_H
#define _IOKIT_IOFIREWIREBUS_H
#include <IOKit/IOService.h>
#include <IOKit/firewire/IOFWIsochChannel.h>
#include <IOKit/firewire/IOFWRegs.h>
#include <IOKit/firewire/IOFWCommand.h>
#include <IOKit/firewire/IOFWAddressSpace.h>
extern const OSSymbol *gFireWireROM;
extern const OSSymbol *gFireWireNodeID;
extern const OSSymbol *gFireWireSelfIDs;
extern const OSSymbol *gFireWireSpeed;
extern const OSSymbol *gFireWireUnit_Spec_ID;
extern const OSSymbol *gFireWireUnit_SW_Version;
extern const OSSymbol *gFireWireVendor_ID;
extern const OSSymbol *gFireWire_GUID;
extern const OSSymbol *gFireWireVendor_Name;
extern const OSSymbol *gFireWireProduct_Name;
class IOFWIsochPort;
class IOFWLocalIsochPort;
struct DCLCommandStruct;
class IOFireWireBus : public IOService
{
OSDeclareAbstractStructors(IOFireWireBus)
public:
static const IORegistryPlane * gIOFireWirePlane;
typedef void (CallUserProc)(void *refcon, void * userProc, void * dclCommand);
typedef struct _DCLTaskInfo {
task_t fTask; vm_address_t fDCLBaseAddr;
UInt32 fDCLSize; vm_address_t fDataBaseAddr;
UInt32 fDataSize;
CallUserProc *fCallUser; void *fCallRefCon; } DCLTaskInfo;
virtual IOFWIsochChannel *createIsochChannel(
bool doIRM, UInt32 bandwidth, IOFWSpeed prefSpeed,
FWIsochChannelForceStopNotificationProc stopProc=NULL,
void *stopRefCon=NULL) = 0;
virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking,
DCLCommandStruct *opcodes, DCLTaskInfo *info = 0,
UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0) = 0;
virtual IOReturn getCycleTime(UInt32 &cycleTime) = 0;
virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime) = 0;
virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir) = 0;
virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir) = 0;
virtual IOReturn resetBus() = 0;
virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID) = 0;
virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon) = 0;
virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem) = 0;
virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len,
FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0;
virtual bool isLockRequest(IOFWRequestRefCon refcon) = 0;
virtual bool isQuadRequest(IOFWRequestRefCon refcon) = 0;
virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon) = 0;
virtual int maxPackLog(bool forSend, UInt16 nodeAddress) const = 0;
virtual int maxPackLog(UInt16 nodeA, UInt16 nodeB) const = 0;
virtual IOReturn makeRoot(UInt32 generation, UInt16 nodeID) = 0;
virtual IOFWPseudoAddressSpace *createInitialAddressSpace(UInt32 addressLo, UInt32 len,
FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0;
virtual IOFWAddressSpace *getAddressSpace(FWAddress address) = 0;
private:
OSMetaClassDeclareReservedUsed(IOFireWireBus, 0);
OSMetaClassDeclareReservedUsed(IOFireWireBus, 1);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 2);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 3);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 4);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 5);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 6);
OSMetaClassDeclareReservedUnused(IOFireWireBus, 7);
};
#endif