Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/usb/IOUSBControllerListElement.h

Source at commit 1146 created 12 years 11 months ago.
By azimutz, Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing).
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 */
40class IOUSBControllerListElement : public OSObject
41{
42 OSDeclareDefaultStructors(IOUSBControllerListElement)
43
44private:
45
46public:
47
48 virtual voidSetPhysicalLink(IOPhysicalAddress next) = 0;
49 virtual IOPhysicalAddressGetPhysicalLink(void) = 0;
50 virtual IOPhysicalAddressGetPhysicalAddrWithType(void) = 0;
51 virtual voidprint(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
60class IOUSBControllerV2;// needed for a parameter
61class IOUSBControllerIsochEndpoint;
62
63class IOUSBControllerIsochListElement : public IOUSBControllerListElement
64{
65 OSDeclareDefaultStructors(IOUSBControllerIsochListElement)
66
67private:
68
69public:
70
71 virtual voidSetPhysicalLink(IOPhysicalAddress next) = 0;
72 virtual IOPhysicalAddressGetPhysicalLink(void) = 0;
73 virtual IOPhysicalAddressGetPhysicalAddrWithType(void) = 0;
74 virtual voidprint(int level);
75
76 IOUSBControllerIsochEndpoint*_pEndpoint;
77 IOUSBIsocFrame*_pFrames;
78 IOUSBIsocCompletion_completion;
79 Boolean_lowLatency;
80bool_requestFromRosettaClient; // True if the request originated from a Rosetta client in user space
81UInt8_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 IOReturnUpdateFrameList(AbsoluteTime timeStamp) = 0;
88 virtual IOReturnDeallocate(IOUSBControllerV2 *uim) = 0;
89};
90
91class IOUSBControllerIsochEndpoint : public OSObject
92{
93 OSDeclareDefaultStructors(IOUSBControllerIsochEndpoint)
94
95public:
96
97virtual 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 UInt64firstAvailableFrame;// next frame available for a transfer on this EP
107 UInt32maxPacketSize;
108 UInt32activeTDs;// + when added to todo list, - when taken from done queue
109 UInt32onToDoList;// + when added to todo list, - when taken from done queue
110 UInt32onDoneQueue;// + when added to todo list, - when taken from done queue
111volatile SInt32scheduledTDs;// + when linked onto periodic list, - when unlinked
112UInt32deferredTDs;
113UInt32onProducerQ;
114UInt32onReversedList;
115 UInt16inSlot;// where Isoc TDs are being put in the periodic list
116 shortfunctionAddress;
117 shortendpointNumber;
118 IOReturnaccumulatedStatus;
119UInt32interval;// this is the decoded interval value for HS endpoints and is 1 for FS endpoints
120 UInt8direction;
121boolaborting;
122};
123
124
125#endif
126
127

Archive Download this file

Revision: 1146