IOFWUserIsochPort.h [plain text]
#ifndef _IOKIT_IOFWUserIsochPortProxy_H
#define _IOKIT_IOFWUserIsochPortProxy_H
#import "IOFWUserIsochPort.h"
#import "IOFWIsochPort.h"
#import "IOFireWireBus.h"
#import "IOFireWireUserClient.h"
class IOFWUserIsochPort: public IOFWIsochPort
{
OSDeclareDefaultStructors(IOFWUserIsochPort)
public:
virtual bool init() ;
virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) ;
virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) ;
virtual IOReturn releasePort() ; virtual IOReturn start() ; virtual IOReturn stop() ;
protected:
IOFWSpeed fMaxSpeed ;
UInt32 fChanSupported ;
} ;
class IOFWUserIsochPortProxy: public OSObject
{
OSDeclareDefaultStructors(IOFWUserIsochPortProxy)
public:
virtual Boolean init(
IOFireWireUserClient* inUserClient) ;
virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) ;
virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) ;
virtual IOReturn releasePort() ; virtual IOReturn start() ; virtual IOReturn stop() ;
const IOFWIsochPort* getPort() const { return fPort; }
virtual IOReturn createPort() ;
protected:
IOFireWireUserClient* fUserClient ;
IOFWIsochPort* fPort ;
Boolean fPortStarted ;
Boolean fPortAllocated ;
IOFireWireBus::DCLTaskInfo fTaskInfo;
virtual void free() ;
} ;
#pragma mark -
class IOFWUserLocalIsochPortProxy: public IOFWUserIsochPortProxy
{
OSDeclareDefaultStructors(IOFWUserLocalIsochPortProxy)
public:
virtual Boolean initWithUserDCLProgram(
LocalIsochPortAllocateParams* inParams,
IOFireWireUserClient* inUserClient) ;
virtual IOReturn getSupported(
IOFWSpeed& maxSpeed,
UInt64& chanSupported) ;
virtual IOReturn allocatePort(
IOFWSpeed speed,
UInt32 chan) ;
virtual IOReturn releasePort() ;
virtual IOReturn stop() ;
static Boolean getDCLDataBuffer(
const DCLCommand* dcl,
IOVirtualAddress* outDataBuffer,
IOByteCount* outDataLength) ;
static void setDCLDataBuffer(
DCLCommand* dcl,
IOVirtualAddress inDataBuffer,
IOByteCount inDataLength) ;
static IOByteCount getDCLSize(
DCLCommand* dcl) ;
static void printDCLProgram(
const DCLCommand* dcl,
UInt32 inDCLCount) ;
virtual IOReturn convertToKernelDCL(
DCLUpdateDCLListStruct* inDCLCommand,
DCLCommand* inUserDCLTable[],
DCLCommand* inUserToKernelDCLLookupTable[],
UInt32 inLookupTableLength,
UInt32& inOutHint ) ;
virtual IOReturn convertToKernelDCL(
DCLJumpStruct* inDCLCommand,
DCLCommand* inUserDCLTable[],
DCLCommand* inUserToKernelDCLLookupTable[],
UInt32 inLookupTableLength,
UInt32& inOutHint ) ;
virtual IOReturn convertToKernelDCL(
DCLCallProcStruct* inDCLCommand,
DCLCommand* inUserDCL ) ;
static Boolean findOffsetInRanges(
IOVirtualAddress inAddress,
IOVirtualRange inRanges[],
UInt32 inRangeCount,
IOByteCount* outOffset) ;
static Boolean userToKernLookup(
DCLCommand* inDCLCommand,
DCLCommand* inUserDCLList[],
DCLCommand* inKernDCLList[],
UInt32 inTableLength,
UInt32& inOutHint,
DCLCommand** outDCLCommand ) ;
static void dclCallProcHandler(
DCLCommand* pDCLCommand) ;
virtual IOReturn setAsyncRef_DCLCallProc( OSAsyncReference asyncRef, DCLCallCommandProc* proc) ;
virtual IOReturn modifyJumpDCL(
UInt32 inJumpDCLCompilerData,
UInt32 inLabelDCLCompilerData) ;
virtual IOReturn modifyJumpDCLSize( UInt32 inDCLCompilerData, IOByteCount newSize ) ;
protected:
IOMemoryDescriptor* fUserDCLProgramMem ;
IOByteCount fDCLProgramBytes ;
IOMemoryDescriptor* fUserBufferMem ;
Boolean fUserBufferMemPrepared ;
IOMemoryMap* fUserBufferMemMap ;
Boolean fUserDCLProgramMemPrepared ;
UInt8* fKernDCLProgramBuffer ;
DCLCommand* fKernDCLProgramStart ;
Boolean fTalking ;
UInt32 fStartState ;
UInt32 fStartMask ;
UInt32 fStartEvent ;
UInt32 fUserToKernelDCLLookupTableLength ;
DCLCommand** fUserToKernelDCLLookupTable ;
OSAsyncReference fStopTokenAsyncRef ;
void* fUserObj ;
virtual void free() ;
virtual IOReturn createPort() ;
} ;
#endif //_IOKIT_IOFWUserIsochPortProxy_H