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;
};
class AppleUSBEHCI;
class AppleEHCIIsochListElement : public AppleEHCIListElement
{
OSDeclareDefaultStructors(AppleEHCIIsochListElement)
private:
public:
virtual void print(int level);
AppleEHCIIsochEndpointPtr myEndpoint;
IOUSBIsocFrame *myFrames;
IOUSBIsocCompletion completion;
Boolean lowLatency;
UInt64 frameNumber; UInt32 frameIndex; AppleEHCIIsochListElement * doneQueueLink;
virtual IOReturn UpdateFrameList(void) = 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(void);
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(void);
virtual IOReturn Deallocate(AppleUSBEHCI *uim);
virtual void print(int level);
EHCISplitIsochTransferDescriptorSharedPtr GetSharedLogical(void);
};
#endif