Root/
Source at commit 1166 created 13 years 10 days ago. By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged. | |
---|---|
1 | /*␊ |
2 | *␊ |
3 | * @APPLE_LICENSE_HEADER_START@␊ |
4 | * ␊ |
5 | * Copyright (c) 1998-2007 Apple Inc. All Rights Reserved.␊ |
6 | * ␊ |
7 | * This file contains Original Code and/or Modifications of Original Code␊ |
8 | * as defined in and that are subject to the Apple Public Source License␊ |
9 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
10 | * compliance with the License. Please obtain a copy of the License at␊ |
11 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
12 | * file.␊ |
13 | * ␊ |
14 | * The Original Code and all software distributed under the License are␊ |
15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
19 | * Please see the License for the specific language governing rights and␊ |
20 | * limitations under the License.␊ |
21 | * ␊ |
22 | * @APPLE_LICENSE_HEADER_END@␊ |
23 | */␊ |
24 | ␊ |
25 | #ifndef _IOUSBCONTROLLERLISTELEMENT_H␊ |
26 | #define _IOUSBCONTROLLERLISTELEMENT_H␊ |
27 | ␊ |
28 | ␊ |
29 | #include <libkern/c++/OSObject.h>␊ |
30 | ␊ |
31 | #include <IOKit/IOTypes.h>␊ |
32 | ␊ |
33 | #include <IOKit/usb/USB.h>␊ |
34 | ␊ |
35 | ␊ |
36 | /*!␊ |
37 | @class IOUSBControllerListElement␊ |
38 | @abstract Used by the IOUSBController to manage the USB controller lists that are common between EHCI and UHCI.␊ |
39 | */␊ |
40 | class IOUSBControllerListElement : public OSObject␊ |
41 | {␊ |
42 | OSDeclareDefaultStructors(IOUSBControllerListElement)␊ |
43 | ␉␊ |
44 | private: ␊ |
45 | ␉␊ |
46 | public:␊ |
47 | ␉␊ |
48 | virtual void␉␉␉␉␉SetPhysicalLink(IOPhysicalAddress next) = 0;␊ |
49 | virtual IOPhysicalAddress␉␉GetPhysicalLink(void) = 0;␊ |
50 | virtual IOPhysicalAddress␉␉GetPhysicalAddrWithType(void) = 0;␊ |
51 | virtual void␉␉␉␉␉print(int level);␊ |
52 | ␉␊ |
53 | IOPhysicalAddress␉␉␉␉_sharedPhysical;␉␉␉// phys address of the memory shared with the controller␉␉␉␊ |
54 | void *␉␉␉␉␉␉␉_sharedLogical;␉␉␉␉// logical address of the above␊ |
55 | IOUSBControllerListElement␉␉*_logicalNext;␉␉␉␉// the next element in the list␊ |
56 | ␊ |
57 | };␊ |
58 | ␊ |
59 | ␊ |
60 | class IOUSBControllerV2;␉␉␉␉␉␉␉␉␉␉// needed for a parameter␊ |
61 | class IOUSBControllerIsochEndpoint;␊ |
62 | ␊ |
63 | class IOUSBControllerIsochListElement : public IOUSBControllerListElement␊ |
64 | {␊ |
65 | OSDeclareDefaultStructors(IOUSBControllerIsochListElement)␊ |
66 | ␉␊ |
67 | private:␊ |
68 | ␊ |
69 | public:␊ |
70 | ␉␊ |
71 | virtual void␉␉␉␉␉SetPhysicalLink(IOPhysicalAddress next) = 0;␊ |
72 | virtual IOPhysicalAddress␉␉GetPhysicalLink(void) = 0;␊ |
73 | virtual IOPhysicalAddress␉␉GetPhysicalAddrWithType(void) = 0;␊ |
74 | virtual void␉␉␉␉␉print(int level);␊ |
75 | ␉␊ |
76 | IOUSBControllerIsochEndpoint␉*_pEndpoint;␊ |
77 | IOUSBIsocFrame␉␉␉␉␉*_pFrames;␊ |
78 | IOUSBIsocCompletion␉␉␉␉_completion;␊ |
79 | Boolean␉␉␉␉␉␉␉_lowLatency;␊ |
80 | ␉bool␉␉␉␉␉␉␉_requestFromRosettaClient; // True if the request originated from a Rosetta client in user space␊ |
81 | ␉UInt8␉␉␉␉␉␉␉_framesInTD;␉␉␉// used for HS Isoch only␊ |
82 | UInt64␉␉␉␉␉␉␉_frameNumber;␉␉␉// frame number for scheduling purposes␊ |
83 | UInt32␉␉␉␉␉␉␉_frameIndex;␉␉␉// index into the myFrames array␊ |
84 | IOUSBControllerIsochListElement *_doneQueueLink;␉␉// linkage used by done queue processing␊ |
85 | ␉␊ |
86 | // pure virtual methods which must be implemented by descendants␊ |
87 | virtual IOReturn␉␉␉␉UpdateFrameList(AbsoluteTime timeStamp) = 0;␊ |
88 | virtual IOReturn␉␉␉␉Deallocate(IOUSBControllerV2 *uim) = 0;␊ |
89 | };␊ |
90 | ␊ |
91 | class IOUSBControllerIsochEndpoint : public OSObject␊ |
92 | {␊ |
93 | OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint)␊ |
94 | ␉␊ |
95 | public:␊ |
96 | ␉␊ |
97 | ␉virtual bool init();␊ |
98 | ␊ |
99 | IOUSBControllerIsochEndpoint␉␉*nextEP;␊ |
100 | IOUSBControllerIsochListElement ␉*toDoList;␉␉␉␉␉// ITD or SITD␊ |
101 | IOUSBControllerIsochListElement ␉*toDoEnd;␉␉␉␉␉// ITD or SITD␊ |
102 | IOUSBControllerIsochListElement ␉*doneQueue;␉␉␉␉␉// ITD or SITD␊ |
103 | IOUSBControllerIsochListElement ␉*doneEnd;␉␉␉␉␉// ITD or SITD␊ |
104 | IOUSBControllerIsochListElement ␉*deferredQueue;␉␉␉␉// ITD or SITD␊ |
105 | IOUSBControllerIsochListElement ␉*deferredEnd;␉␉␉␉// ITD or SITD␊ |
106 | UInt64␉␉␉␉␉␉␉␉firstAvailableFrame;␉␉// next frame available for a transfer on this EP␊ |
107 | UInt32␉␉␉␉␉␉␉␉maxPacketSize;␊ |
108 | UInt32␉␉␉␉␉␉␉␉activeTDs;␉␉␉␉␉// + when added to todo list, - when taken from done queue␊ |
109 | UInt32␉␉␉␉␉␉␉␉onToDoList;␉␉␉␉␉// + when added to todo list, - when taken from done queue␊ |
110 | UInt32␉␉␉␉␉␉␉␉onDoneQueue;␉␉␉␉␉// + when added to todo list, - when taken from done queue␊ |
111 | ␉volatile SInt32␉␉␉␉␉␉scheduledTDs;␉␉␉␉// + when linked onto periodic list, - when unlinked␊ |
112 | ␉UInt32␉␉␉␉␉␉␉␉deferredTDs;␊ |
113 | ␉UInt32␉␉␉␉␉␉␉␉onProducerQ;␊ |
114 | ␉UInt32␉␉␉␉␉␉␉␉onReversedList;␊ |
115 | UInt16␉␉␉␉␉␉␉␉inSlot;␉␉␉␉␉␉// where Isoc TDs are being put in the periodic list ␊ |
116 | short␉␉␉␉␉␉␉␉functionAddress;␊ |
117 | short␉␉␉␉␉␉␉␉endpointNumber;␊ |
118 | IOReturn␉␉␉␉␉␉␉accumulatedStatus;␊ |
119 | ␉UInt32␉␉␉␉␉␉␉␉interval;␉␉␉␉␉// this is the decoded interval value for HS endpoints and is 1 for FS endpoints␊ |
120 | UInt8␉␉␉␉␉␉␉␉direction;␊ |
121 | ␉bool␉␉␉␉␉␉␉␉aborting;␊ |
122 | };␊ |
123 | ␊ |
124 | ␊ |
125 | #endif␊ |
126 | ␊ |
127 |