Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/firewire/IOFWDCL.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* IOFWDCL.h
3* IOFireWireFamily
4*
5* Created by Niels on Fri Feb 21 2003.
6* Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
7*
8*$Log: IOFWDCL.h,v $
9*Revision 1.20 2008/11/14 00:17:11 arulchan
10*fix for rdar://5939334
11*
12*Revision 1.19 2007/03/14 01:01:12 collin
13**** empty log message ***
14*
15*Revision 1.18 2007/01/26 23:42:19 ayanowit
16*another fix for nuDCL rosetta mode
17*
18*Revision 1.17 2006/08/16 01:41:41 collin
19**** empty log message ***
20*
21*Revision 1.16 2006/03/09 22:26:46 niels
22*fix 4466075
23*
24*Revision 1.15 2006/03/09 22:20:14 niels
25*fix 4466075
26*
27*Revision 1.14 2006/03/09 21:40:44 niels
28*fix 4466075
29*
30*Revision 1.13 2006/02/09 00:21:50 niels
31*merge chardonnay branch to tot
32*
33*Revision 1.12.4.1 2005/08/06 01:31:31 collin
34**** empty log message ***
35*
36*Revision 1.12 2005/02/18 03:19:03 niels
37*fix isight
38*
39*Revision 1.11 2004/04/19 21:51:49 niels
40**** empty log message ***
41*
42*Revision 1.10 2004/03/25 00:00:23 niels
43*fix panic allocating large physical address spaces
44*
45*Revision 1.9 2003/10/31 02:40:58 niels
46**** empty log message ***
47*
48*Revision 1.8 2003/08/26 05:11:21 niels
49**** empty log message ***
50*
51*Revision 1.7 2003/08/25 08:39:15 niels
52**** empty log message ***
53*
54*Revision 1.6 2003/08/18 23:18:14 niels
55**** empty log message ***
56*
57*Revision 1.5 2003/08/08 22:30:32 niels
58**** empty log message ***
59*
60*Revision 1.4 2003/07/30 05:22:14 niels
61**** empty log message ***
62*
63*Revision 1.3 2003/07/29 22:49:22 niels
64**** empty log message ***
65*
66*Revision 1.2 2003/07/21 06:52:58 niels
67*merge isoch to TOT
68*
69*Revision 1.1.2.5 2003/07/18 00:17:41 niels
70**** empty log message ***
71*
72*Revision 1.1.2.4 2003/07/14 22:08:53 niels
73**** empty log message ***
74*
75*Revision 1.1.2.3 2003/07/11 18:15:33 niels
76**** empty log message ***
77*
78*Revision 1.1.2.2 2003/07/03 22:10:24 niels
79*fix iidc/dv rcv
80*
81*Revision 1.1.2.1 2003/07/01 20:54:06 niels
82*isoch merge
83*
84*/
85
86#import <IOKit/firewire/IOFireWireFamilyCommon.h>
87
88#import <libkern/c++/OSObject.h>
89#import <libkern/c++/OSSet.h>
90#import <IOKit/IOTypes.h>
91
92class IODCLProgram ;
93class OSIterator ;
94class IOFireWireLink ;
95class IOMemoryMap ;
96
97/*! @class IOFWDCL
98*/
99
100class IOFWDCL : public OSObject
101{
102OSDeclareAbstractStructors( IOFWDCL ) ;
103
104public:
105
106typedef void (*Callback)( void * refcon ) ;
107
108enum
109{
110kDynamic= BIT(1)//kNuDCLDynamic,
111,kUpdateBeforeCallback= BIT(2)//kNuDCLUpdateBeforeCallback
112,kUser= BIT(18) // kNuDCLUser
113,kBigEndianUpdates= BIT(19) // NOTE: Don't change this without making similar change to IOFireWireLib's NuDCL::Export(...)!
114} ;
115
116class InternalData
117{
118public:
119
120IOFWDCL *lastBranch ;
121} ;
122
123protected:
124
125IOFWDCL*fBranch ;
126CallbackfCallback ;
127volatile UInt32 *fTimeStampPtr ;
128UInt32fRangeCount ;
129IOVirtualRange *fRanges ;
130OSSet*fUpdateList ;
131OSIterator *fUpdateIterator ;
132volatile UInt32 *fUserStatusPtr ;
133void*fRefcon ;
134UInt32fFlags ;
135
136InternalData *fLoLevel ;
137
138public:
139
140//
141// IOFWDCL public API:
142//
143
144virtual boolinitWithRanges (
145OSSet * updateSet,
146unsigned rangesCount = 0,
147IOVirtualRange ranges [] = NULL ) ;
148
149voidsetBranch( IOFWDCL* branch ) ;
150IOFWDCL*getBranch()const ;
151voidsetTimeStampPtr ( UInt32* timeStampPtr ) ;
152UInt32*getTimeStampPtr () const ;
153voidsetCallback( Callback callback ) ;
154CallbackgetCallback() const ;
155voidsetStatusPtr( UInt32* statusPtr ) ;
156UInt32*getStatusPtr() const ;
157voidsetRefcon( void * refcon ) ;
158void *getRefcon() const ;
159const OSSet*getUpdateList() const ;
160
161virtual IOReturnaddRange ( IOVirtualRange& range ) ;
162virtual IOReturnsetRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ;
163virtual UInt32getRanges( UInt32 maxRanges, IOVirtualRange ranges[] ) const ;
164virtual UInt32countRanges() ;
165virtual IOReturngetSpan( IOVirtualRange& result ) const ;
166virtual IOByteCountgetSize() const ;
167IOReturnappendUpdateList( IOFWDCL* updateDCL ) ;
168IOReturnsetUpdateList( OSSet* updateList ) ;
169voidemptyUpdateList() ;
170voidsetFlags( UInt32 flags ) ;
171UInt32getFlags() const ;
172
173
174virtual voidupdate() = 0 ;
175
176// OSObject
177
178virtual voidfree () ;
179
180public:
181
182//
183// internal use only; please don't use...
184//
185
186virtual IOReturncompile( IODCLProgram & , bool & ) = 0 ;
187virtual voidlink () = 0 ;
188
189OSMetaClassDeclareReservedUnused ( IOFWDCL, 4 ) ;// used to be relink()
190
191public :
192virtual boolinterrupt( bool &, IOFWDCL * & ) = 0 ;
193virtual voidfinalize ( IODCLProgram & ) ;
194virtual IOReturnimportUserDCL (
195UInt8 *data,
196IOByteCount &dataSize,
197IOMemoryMap *bufferMap,
198const OSArray *dcl ) ;
199
200protected :
201
202friend class IOFWDCLFriend ;
203
204public :
205
206// dump DCL info...
207virtual voiddebug() ;
208
209public:
210
211//
212// internal use only; please don't use...
213//
214
215virtual boolcheckForInterrupt() = 0 ;
216
217 OSMetaClassDeclareReservedUsed ( IOFWDCL, 0 ) ;
218 OSMetaClassDeclareReservedUnused ( IOFWDCL, 1 ) ;
219 OSMetaClassDeclareReservedUnused ( IOFWDCL, 2 ) ;
220 OSMetaClassDeclareReservedUnused ( IOFWDCL, 3 ) ;
221//OSMetaClassDeclareReservedUnused ( ***, 4 ) ;// used above
222
223} ;
224
225#pragma mark -
226
227/*! @class IOFWReceiveDCL
228*/
229
230class IOFWReceiveDCL : public IOFWDCL
231{
232OSDeclareAbstractStructors( IOFWReceiveDCL )
233
234protected :
235
236UInt8fHeaderBytes ;
237boolfWait ;
238
239public:
240
241// me
242virtual boolinitWithParams(
243OSSet *updateSet,
244UInt8headerBytes,
245unsignedrangesCount,
246IOVirtualRangeranges [] ) ;
247IOReturnsetWaitControl( bool wait ) ;
248
249public :
250
251// internal use only:
252virtual IOReturnimportUserDCL (
253UInt8 *data,
254IOByteCount &dataSize,
255IOMemoryMap *bufferMap,
256const OSArray *dcl ) ;
257
258protected :
259
260virtual voiddebug() ;
261
262} ;
263
264#pragma mark -
265
266/*! @class IOFWSendDCL
267*/
268
269class IOFWSendDCL : public IOFWDCL
270{
271OSDeclareAbstractStructors( IOFWSendDCL )
272
273protected:
274
275UInt32 * fUserHeaderPtr ;// pointer to 2 quadlets containing isoch header for this packet
276UInt32 *fUserHeaderMaskPtr ;// pointer to 2 quadlets; used to mask header quadlets
277IOFWDCL *fSkipBranchDCL ;
278CallbackfSkipCallback ;
279void *fSkipRefcon ;
280UInt8fSync ;
281UInt8fTag ;
282
283public:
284
285// OSObject
286virtual voidfree() ;
287
288// IOFWDCL
289virtual IOReturnaddRange ( IOVirtualRange& range ) ;
290virtual IOReturnsetRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ;
291
292// me
293virtual boolinitWithParams( OSSet * updateSet,
294unsigned rangesCount = 0,
295IOVirtualRange ranges [] = NULL,
296UInt8sync = 0,
297UInt8tag = 0 ) ;
298
299voidsetUserHeaderPtr( UInt32* userHeaderPtr, UInt32 * maskPtr ) ;
300UInt32 *getUserHeaderPtr() ;
301UInt32 *getUserHeaderMask() ;
302voidsetSkipBranch( IOFWDCL * skipBranchDCL ) ;
303IOFWDCL *getSkipBranch() const ;
304voidsetSkipCallback( Callback callback ) ;
305CallbackgetSkipCallback() const ;
306voidsetSkipRefcon( void * refcon = 0 ) ;
307void *getSkipRefcon() const ;
308voidsetSync( UInt8 sync ) ;
309UInt8getSync() const ;
310voidsetTag( UInt8 tag ) ;
311UInt8getTag() const ;
312
313public :
314
315// internal use only:
316virtual IOReturnimportUserDCL (
317UInt8 *data,
318IOByteCount &dataSize,
319IOMemoryMap *bufferMap,
320const OSArray *dcl ) ;
321protected :
322
323virtual voiddebug() ;
324} ;
325
326#pragma mark -
327
328/*! @class IOFWSkipCycleDCL
329*/
330
331class IOFWSkipCycleDCL : public IOFWDCL
332{
333OSDeclareAbstractStructors( IOFWSkipCycleDCL )
334
335public:
336
337virtual boolinit() ;
338
339virtual IOReturnaddRange ( IOVirtualRange& range ) ;
340virtual IOReturnsetRanges ( UInt32 numRanges, IOVirtualRange ranges[] ) ;
341virtual IOReturngetSpan( IOVirtualRange& result ) ;
342
343protected :
344
345virtual voiddebug() ;
346} ;
347

Archive Download this file

Revision: 1146