AppleEHCIListElement.h [plain text]
#ifndef _IOKIT_AppleEHCIListElement_H
#define _IOKIT_AppleEHCIListElement_H
#include <libkern/c++/OSObject.h>
#include "AppleUSBEHCI.h"
#include "USBEHCI.h"
class AppleEHCIListElement : public OSObject
{
OSDeclareDefaultStructors(AppleEHCIListElement)
private:
public:
virtual void SetPhysicalLink(IOPhysicalAddress next) = 0;
virtual IOPhysicalAddress GetPhysicalLink(void) = 0;
virtual IOPhysicalAddress GetPhysicalAddrWithType(void) = 0;
virtual void print(int level);
IOPhysicalAddress _sharedPhysical; void * _sharedLogical; AppleEHCIListElement * _logicalNext;
};
class AppleEHCIQueueHead : public AppleEHCIListElement
{
OSDeclareDefaultStructors(AppleEHCIQueueHead)
private:
public:
static AppleEHCIQueueHead *WithSharedMemory(EHCIQueueHeadSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual void print(int level);
EHCIQueueHeadSharedPtr GetSharedLogical(void);
EHCIGeneralTransferDescriptorPtr _qTD;
EHCIGeneralTransferDescriptorPtr _TailTD;
UInt16 _maxPacketSize;
UInt8 _direction;
UInt8 _pollM1;
UInt8 _offset;
UInt8 _responseToStall;
UInt8 _pad2;
UInt8 _bandwidthUsed[8];
};
class AppleUSBEHCI;
class AppleEHCIIsochListElement : public AppleEHCIListElement
{
OSDeclareDefaultStructors(AppleEHCIIsochListElement)
private:
public:
virtual void print(int level);
AppleEHCIIsochEndpointPtr _pEndpoint;
IOUSBIsocFrame * _pFrames;
IOUSBIsocCompletion _completion;
Boolean _lowLatency;
UInt8 _framesInTD; UInt64 _frameNumber; UInt32 _frameIndex; AppleEHCIIsochListElement * _doneQueueLink;
virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp) = 0;
virtual IOReturn Deallocate(AppleUSBEHCI *uim) = 0;
};
class AppleEHCIIsochTransferDescriptor : public AppleEHCIIsochListElement
{
OSDeclareDefaultStructors(AppleEHCIIsochTransferDescriptor)
public:
static AppleEHCIIsochTransferDescriptor *WithSharedMemory(EHCIIsochTransferDescriptorSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp);
virtual IOReturn Deallocate(AppleUSBEHCI *uim);
virtual void print(int level);
EHCIIsochTransferDescriptorSharedPtr GetSharedLogical(void);
private:
IOReturn mungeEHCIStatus(UInt32 status, UInt16 *transferLen, UInt32 maxPacketSize, UInt8 direction);
};
class AppleEHCISplitIsochTransferDescriptor : public AppleEHCIIsochListElement
{
OSDeclareDefaultStructors(AppleEHCISplitIsochTransferDescriptor)
public:
static AppleEHCISplitIsochTransferDescriptor *WithSharedMemory(EHCISplitIsochTransferDescriptorSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp);
virtual IOReturn Deallocate(AppleUSBEHCI *uim);
virtual void print(int level);
EHCISplitIsochTransferDescriptorSharedPtr GetSharedLogical(void);
bool _isDummySITD;
};
#endif