Root/
Source at commit 1084 created 13 years 1 month ago. By meklort, BiosDisk Read() function working. Write() complete but untested | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * The contents of this file constitute Original Code as defined in and␊ |
7 | * are subject to the Apple Public Source License Version 1.1 (the␊ |
8 | * "License"). You may not use this file except in compliance with the␊ |
9 | * License. Please obtain a copy of the License at␊ |
10 | * http://www.apple.com/publicsource and read it before using this file.␊ |
11 | * ␊ |
12 | * This Original Code and all software distributed under the License are␊ |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the␊ |
17 | * License for the specific language governing rights and limitations␊ |
18 | * under the License.␊ |
19 | * ␊ |
20 | * @APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | /*␊ |
23 | * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved.␊ |
24 | *␊ |
25 | * HISTORY␊ |
26 | *␊ |
27 | */␊ |
28 | ␊ |
29 | ␊ |
30 | #ifndef _IOKIT_IOFIREWIREBUS_H␊ |
31 | #define _IOKIT_IOFIREWIREBUS_H␊ |
32 | ␊ |
33 | #include <IOKit/IOService.h>␊ |
34 | #include <IOKit/firewire/IOFWIsochChannel.h>␊ |
35 | #include <IOKit/firewire/IOFWAddressSpace.h>␊ |
36 | #include <IOKit/firewire/IOFWCommand.h>␊ |
37 | #include <IOKit/firewire/IOFireWireFamilyCommon.h>␊ |
38 | ␊ |
39 | extern const OSSymbol *gFireWireROM;␊ |
40 | extern const OSSymbol *gFireWireNodeID;␊ |
41 | extern const OSSymbol *gFireWireSelfIDs;␊ |
42 | extern const OSSymbol *gFireWireSpeed;␊ |
43 | extern const OSSymbol *gFireWireUnit_Spec_ID;␊ |
44 | extern const OSSymbol *gFireWireUnit_SW_Version;␊ |
45 | extern const OSSymbol *gFireWireVendor_ID;␊ |
46 | extern const OSSymbol *gFireWire_GUID;␊ |
47 | extern const OSSymbol *gFireWireVendor_Name;␊ |
48 | extern const OSSymbol *gFireWireProduct_Name;␊ |
49 | extern const OSSymbol *gFireWireModel_ID;␊ |
50 | extern const OSSymbol *gFireWireTDM;␊ |
51 | ␊ |
52 | class IOFireWireDevice;␊ |
53 | class IOLocalConfigDirectory;␊ |
54 | class IOFWLocalIsochPort;␊ |
55 | class IOFireWirePowerManager;␊ |
56 | class IOFireWireBus;␊ |
57 | class IOFWDCLPool;␊ |
58 | class IOFWSimpleContiguousPhysicalAddressSpace;␊ |
59 | class IOFWSimplePhysicalAddressSpace;␊ |
60 | class IOFWUserObjectExporter;␊ |
61 | ␊ |
62 | #pragma mark -␊ |
63 | ␊ |
64 | /*! ␊ |
65 | ␉@class IOFireWireBusAux␊ |
66 | */␊ |
67 | ␊ |
68 | class IOFireWireBusAux : public OSObject␊ |
69 | {␊ |
70 | OSDeclareAbstractStructors(IOFireWireBusAux)␊ |
71 | ␊ |
72 | ␉friend class IOFireWireBus;␊ |
73 | ␉␊ |
74 | ␉protected:␊ |
75 | ␉␉␉␊ |
76 | ␉␉/*! ␊ |
77 | ␉␉␉@struct ExpansionData␊ |
78 | ␉␉␉@discussion This structure will be used to expand the capablilties of the class in the future.␊ |
79 | ␉␉*/ ␊ |
80 | ␉␉␊ |
81 | ␉␉struct ExpansionData { };␊ |
82 | ␉␊ |
83 | ␉␉/*! ␊ |
84 | ␉␉␉@var reserved␊ |
85 | ␉␉␉Reserved for future use. (Internal use only) ␊ |
86 | ␉␉*/␊ |
87 | ␉␉␊ |
88 | ␉␉ExpansionData * reserved;␊ |
89 | ␉␊ |
90 | ␉public :␊ |
91 | ␉␊ |
92 | ␉␉virtual IOFWDCLPool *␉␉␉␉␉␉␉createDCLPool ( unsigned capacity ) const = 0 ;␊ |
93 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 32);␊ |
94 | ␉␉virtual UInt8 getMaxRec( void ) = 0;␊ |
95 | ␊ |
96 | ␉␉virtual UInt64 getFireWirePhysicalAddressMask( void ) = 0;␊ |
97 | ␉␉virtual UInt32 getFireWirePhysicalAddressBits( void ) = 0;␊ |
98 | ␉␉virtual UInt64 getFireWirePhysicalBufferMask( void ) = 0;␊ |
99 | ␉␉virtual UInt32 getFireWirePhysicalBufferBits( void ) = 0;␊ |
100 | ␊ |
101 | ␉␉virtual IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0;␊ |
102 | ␉␉virtual IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction ) = 0;␊ |
103 | ␊ |
104 | ␉␉virtual IOFWUserObjectExporter * getSessionRefExporter( void ) = 0;␊ |
105 | ␉␊ |
106 | ␉private:␊ |
107 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 0);␊ |
108 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 1);␊ |
109 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 2);␊ |
110 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBusAux, 3);␊ |
111 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 4);␊ |
112 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 5);␊ |
113 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 6);␊ |
114 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 7);␊ |
115 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 8);␊ |
116 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 9);␊ |
117 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 10);␊ |
118 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 11);␊ |
119 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 12);␊ |
120 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 13);␊ |
121 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 14);␊ |
122 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 15);␊ |
123 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 16);␊ |
124 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 17);␊ |
125 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 18);␊ |
126 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 19);␊ |
127 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 20);␊ |
128 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 21);␊ |
129 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 22);␊ |
130 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 23);␊ |
131 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 24);␊ |
132 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 25);␊ |
133 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 26);␊ |
134 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 27);␊ |
135 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 28);␊ |
136 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 29);␊ |
137 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 30);␊ |
138 | ␉␉OSMetaClassDeclareReservedUnused(IOFireWireBusAux, 31);␊ |
139 | ␉␉␊ |
140 | };␊ |
141 | ␊ |
142 | #pragma mark -␊ |
143 | ␊ |
144 | /*! ␊ |
145 | ␉@class IOFireWireBus␊ |
146 | ␉@abstract IOFireWireBus is a public class the provides access to␊ |
147 | ␉␉general FireWire functionality...␊ |
148 | */␊ |
149 | ␊ |
150 | class IOFireWireBus : public IOService␊ |
151 | {␊ |
152 | OSDeclareAbstractStructors(IOFireWireBus)␊ |
153 | ␊ |
154 | public:␊ |
155 | ␊ |
156 | ␉struct DCLTaskInfoAux␊ |
157 | ␉{␊ |
158 | ␉␉unsigned version ;␊ |
159 | ␉␉union␉// u␊ |
160 | ␉␉{␊ |
161 | ␉␉␉struct␉// v0␊ |
162 | ␉␉␉{␊ |
163 | ␉␉␉␉IOMemoryMap * bufferMemoryMap ;␉␉␉␉// This field required to get physical addresses to program DMA.␊ |
164 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// If NULL, we try to make the map ourselves.␊ |
165 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// If you created a buffer memory descriptor␊ |
166 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// for your program's buffers, just call map() on it␊ |
167 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// and pass the returned object here...␊ |
168 | ␉␉␉} v0 ;␊ |
169 | ␉␉␉␊ |
170 | ␉␉␉struct // v1␊ |
171 | ␉␉␉{␊ |
172 | ␉␉␉␉IOMemoryMap * bufferMemoryMap ;␉␉␉␉// same as 'bufferMemoryMap' from version 0, above.␊ |
173 | ␉␉␉␉␊ |
174 | ␉␉␉␉IOWorkLoop * workloop ;␉␉␉␉␉␉// A workloop on which to run callbacks for this port..␊ |
175 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// Can be NULL to use FireWire isochronous workloop...␊ |
176 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// The workloop will be retained by the program object.␊ |
177 | ␉␉␉} v1 ;␊ |
178 | ␉␉␉␊ |
179 | ␉␉␉struct␊ |
180 | ␉␉␉{␊ |
181 | ␉␉␉␉IOMemoryMap * bufferMemoryMap ;␉␉␉␉// same as 'bufferMemoryMap' from version 0, above.␊ |
182 | ␉␉␉␉␊ |
183 | ␉␉␉␉IOWorkLoop * workloop ;␉␉␉␉␉␉// A workloop on which to run callbacks for this port..␊ |
184 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// Can be NULL to use FireWire isochronous workloop...␊ |
185 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉// The workloop will be retained by the program object.␊ |
186 | ␉␉␉␉IOFWIsochPortOptions options ;␉␉␉␉// extra options␊ |
187 | ␉␉␉} v2 ;␊ |
188 | ␉␉} u ;␊ |
189 | ␉} ;␊ |
190 | ␉␊ |
191 | ␉// this struct has been redefined for our next generation isochronous architecture,␊ |
192 | ␉// but is backwards compatible with the old definition.. This means we should␊ |
193 | ␉// be safe when an old-style driver is loaded..␊ |
194 | ␉// To use DCLTaskInfo (see createLocalIsochPort) make sure all 'unused' fields are set to 0 or NULL␊ |
195 | ␉// and that auxInfo points to a valid DCLTaskInfoAux struct, defined above.␊ |
196 | ␉␊ |
197 | ␉struct DCLTaskInfo␊ |
198 | ␉{␊ |
199 | ␉␉task_t ␉␉␉␉unused0 ;␊ |
200 | ␉␉vm_address_t ␉␉unused1 ;␊ |
201 | ␉␉UInt32 ␉␉␉␉unused2 ;␊ |
202 | ␉␉vm_address_t ␉␉unused3 ;␊ |
203 | ␉␉UInt32 ␉␉␉␉unused4 ;␊ |
204 | ␉␉void␉␉␉␉(*unused5)(void) ;␊ |
205 | ␉␉DCLTaskInfoAux *␉auxInfo ;␉// Refcon for user call␊ |
206 | ␉} ;␊ |
207 | ␊ |
208 | ␉static const IORegistryPlane * gIOFireWirePlane;␊ |
209 | ␊ |
210 | ␉IOFireWireBusAux * fAuxiliary;␊ |
211 | ␊ |
212 | // Create an Isochronous Channel object␊ |
213 | virtual IOFWIsochChannel *createIsochChannel(␊ |
214 | bool doIRM, UInt32 bandwidth, IOFWSpeed prefSpeed,␊ |
215 | IOFWIsochChannel::ForceStopNotificationProc stopProc=NULL,␊ |
216 | void *stopRefCon=NULL) = 0;␊ |
217 | ␊ |
218 | ␉/*!␉@function createLocalIsochPort␊ |
219 | ␉␉@abstract Create a local isochronous port to run the given DCL program␊ |
220 | ␉␉@param talking Pass true to create a talker port; pass false to create a listener port.␊ |
221 | ␉␉@param opcodes A pointer to your DCL program (linked list of DCLCommand structs)␊ |
222 | ␉␉␉To use an IOFWDCL/IOFWDCLPool program, pass the DCLCommand returned by␊ |
223 | ␉␉␉IOFWDCLPool::getProgram().␊ |
224 | ␉␉@param info (Optional) Pointer to DCLTaskInfo struct containing additional␊ |
225 | ␉␉␉configuration information. If you have an IOMemoryMap for your DCL program data buffers,␊ |
226 | ␉␉␉pass it here. You can also pass an IOWorkLoop if you want to use your own␊ |
227 | ␉␉␉workloop to handle callbacks for the created port object.␊ |
228 | ␉␉@param startEvent Specifies a bus condition on which the port should start receiving/sending packets␊ |
229 | ␉␉␉Must be kFWDCLImmediateEvent, kFWDCLCycleEvent, or kFWDCLSyBitsEvent.␊ |
230 | ␉␉␉Pass kFWDCLImmediateEvent to start without waiting when start() is called. Pass kFWDCLCycleEvent␊ |
231 | ␉␉␉to start() transmitting at a specified bus cycle time. Pass kFWDCLSyBitsEvent (receive only)␊ |
232 | ␉␉␉to start receiving packets once an isochronous packet with a specified sync field arrives.␊ |
233 | ␉␉@param startState Pass the value for the desired start condition, as specified by 'startEvent'␊ |
234 | ␉␉␉kFWDCLImmediateEvent: set to 0␊ |
235 | ␉␉␉kFWDCLCycleEvent: the cycle timer value on which to start processing packets. For talker␊ |
236 | ␉␉␉␉ports, This value will be masked by 'startMask' and packet processing will be begin on the ␊ |
237 | ␉␉␉␉next cycle whose lowest bits match the masked value. For listener ports, pass a 15-bit value␊ |
238 | ␉␉␉␉containg to the low order two bits of cycleSeconds and the 13-bit cycleCount on which to start␊ |
239 | ␉␉␉␉processing packets.␊ |
240 | ␉␉␉kFWDCLSyBitsEvent: The value of the sync field on which to start receive packets. The value will be masked␊ |
241 | ␉␉␉␉by 'startMask'. For DCLCommand based isoch ports, processing will begin on the first received packet ␊ |
242 | ␉␉␉␉that has an isochronous header sync field matching 'startState'. For IOFWDCL/IOFWDCLPool based␊ |
243 | ␉␉␉␉ports, processing will pause on each IOFWDCL that has wait set to true until a packet that has␊ |
244 | ␉␉␉␉an isochronous header sync field matching 'startState' is received.␊ |
245 | ␉␉@result Returns an IOFWLocalIsochPort on success.*/␊ |
246 | virtual IOFWLocalIsochPort *createLocalIsochPort(bool talking,␊ |
247 | DCLCommand *opcodes, DCLTaskInfo *info = 0,␊ |
248 | UInt32 startEvent = 0, UInt32 startState = 0, UInt32 startMask = 0) = 0;␊ |
249 | ␊ |
250 | virtual IOReturn getCycleTime(UInt32 &cycleTime) = 0;␊ |
251 | virtual IOReturn getBusCycleTime(UInt32 &busTime, UInt32 &cycleTime) = 0;␊ |
252 | ␊ |
253 | // Methods to manipulate the local Config ROM␊ |
254 | virtual IOReturn AddUnitDirectory(IOLocalConfigDirectory *unitDir) = 0;␊ |
255 | virtual IOReturn RemoveUnitDirectory(IOLocalConfigDirectory *unitDir) = 0;␊ |
256 | ␊ |
257 | // Cause a bus reset␊ |
258 | virtual IOReturn resetBus() = 0;␊ |
259 | ␊ |
260 | // Convert a firewire nodeID into the IOFireWireDevice for it␊ |
261 | virtual IOFireWireDevice * nodeIDtoDevice(UInt32 generation, UInt16 nodeID) = 0;␊ |
262 | ␊ |
263 | // Execute specified function on workloop after specified delay␊ |
264 | // Returned command is for delay, call it's cancel() function to cancel timeout.␊ |
265 | virtual IOFWDelayCommand * createDelayedCmd(UInt32 uSecDelay, FWBusCallback func, void *refcon) = 0;␊ |
266 | ␊ |
267 | virtual IOFWPhysicalAddressSpace *createPhysicalAddressSpace(IOMemoryDescriptor *mem) = 0;␊ |
268 | virtual IOFWPseudoAddressSpace *createPseudoAddressSpace(FWAddress *addr, UInt32 len,␊ |
269 | FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0;␊ |
270 | ␊ |
271 | ␊ |
272 | // Extract info about the async request␊ |
273 | virtual bool isLockRequest(IOFWRequestRefCon refcon) = 0;␊ |
274 | virtual bool isQuadRequest(IOFWRequestRefCon refcon) = 0;␊ |
275 | virtual UInt32 getExtendedTCode(IOFWRequestRefCon refcon) = 0;␊ |
276 | ␊ |
277 | // How big (as a power of two) can packets sent to/received from the node be?␊ |
278 | virtual int maxPackLog ( bool forSend, UInt16 nodeAddress) const = 0;␊ |
279 | ␊ |
280 | // How big (as a power of two) can packets sent from A to B be?␊ |
281 | virtual int maxPackLog ( UInt16 nodeA, UInt16 nodeB) const = 0;␊ |
282 | ␊ |
283 | // Force given node to be root (via root holdoff Phy packet)␊ |
284 | virtual IOReturn makeRoot ( UInt32 generation, UInt16 nodeID) = 0;␊ |
285 | ␊ |
286 | // Create address space at fixed address in initial register space␊ |
287 | virtual IOFWPseudoAddressSpace * createInitialAddressSpace (␉UInt32 addressLo, UInt32 len,␊ |
288 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉FWReadCallback reader, FWWriteCallback writer, void *refcon) = 0;␊ |
289 | ␊ |
290 | // Get address space object for given address, if any␊ |
291 | virtual IOFWAddressSpace *␉␉␉␉␉␉getAddressSpace(FWAddress address) = 0;␊ |
292 | ␊ |
293 | // Extract info about the async request - was the request ack'ed complete already?␊ |
294 | virtual bool␉␉␉␉␉␉␉␉␉isCompleteRequest(IOFWRequestRefCon refcon) = 0;␊ |
295 | ␊ |
296 | virtual IOFWAsyncStreamCommand *␉␉␉␉createAsyncStreamCommand( UInt32 generation,␊ |
297 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem,␊ |
298 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉UInt32 size, int speed,FWAsyncStreamCallback completion=NULL, void *refcon=NULL) = 0;␊ |
299 | ␉virtual UInt32␉␉␉␉␉␉␉␉␉hopCount(UInt16 nodeAAddress, UInt16 nodeBAddress ) = 0;␊ |
300 | ␉virtual UInt32␉␉␉␉␉␉␉␉␉hopCount(UInt16 nodeAAddress ) = 0;␊ |
301 | ␉virtual IOFireWirePowerManager *␉␉␉␉getBusPowerManager( void ) = 0;␊ |
302 | ␊ |
303 | protected:␊ |
304 | ␊ |
305 | ␉virtual IOFireWireBusAux *␉␉␉␉␉␉createAuxiliary( void ) = 0;␊ |
306 | ␊ |
307 | ␉public :␊ |
308 | ␉␊ |
309 | ␉␉inline IOFWDCLPool *␉␉␉␉␉␉createDCLPool ( UInt32 capacity = 0 )␉␉␉{ return fAuxiliary->createDCLPool ( capacity ) ; }␊ |
310 | ␉␉inline UInt8␉␉␉␉␉␉␉␉getMaxRec( void )␉␉␉␉␉␉␉␉{ return fAuxiliary->getMaxRec(); }␊ |
311 | ␊ |
312 | ␉␉// get the physical addressing limitations for this controller␊ |
313 | ␊ |
314 | ␉␉// returns the physical mask for memory addressable by the bus and this controller's DMA engine␊ |
315 | ␉␉// intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask()␊ |
316 | ␉␉// all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF␊ |
317 | ␉␉// this API is intended for allocating physical buffers. ␊ |
318 | ␉␉// it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses␊ |
319 | ␉␉inline UInt64 getFireWirePhysicalAddressMask( void )␊ |
320 | ␉␉␉{ return fAuxiliary->getFireWirePhysicalAddressMask(); }␊ |
321 | ␉␉␊ |
322 | ␉␉// returns a count of the maximum addressing bits supported by the bus and this controller␊ |
323 | ␉␉// intended for use with IODMACommand::withSpecification()␊ |
324 | ␉␉// all current hardware is 32 bit --- currently returns 32␊ |
325 | ␉␉// this API is intended for allocating physical buffers. ␊ |
326 | ␉␉// it will not return more than 48 bits so that buffer addresses can be turned into FWAddresses␊ |
327 | ␉␉inline UInt32 getFireWirePhysicalAddressBits( void )␊ |
328 | ␉␉␉{ return fAuxiliary->getFireWirePhysicalAddressBits(); }␊ |
329 | ␊ |
330 | ␉␉// returns the physical mask for memory addressable by this controller's DMA engine␊ |
331 | ␉␉// intended for use with IOBufferMemoryDescriptor::inTaskWithPhysicalMask()␊ |
332 | ␉␉// all current hardware is 32 bit --- currently returns 0x00000000FFFFFFFF␊ |
333 | ␉␉// this API is to allocate isoch and other buffers that don't need to be addressable by the bus ␊ |
334 | ␉␉// it may someday return as high 64 bits␊ |
335 | ␉␉inline UInt64 getFireWirePhysicalBufferMask( void )␊ |
336 | ␉␉␉{ return fAuxiliary->getFireWirePhysicalBufferMask(); }␊ |
337 | ␉␉␊ |
338 | ␉␉// returns a count of the maximum addressing bits supported by this controller␊ |
339 | ␉␉// intended for use with IODMACommand::withSpecification()␊ |
340 | ␉␉// all current hardware is 32 bit --- currently returns 32␊ |
341 | ␉␉// this API is to allocate isoch and other buffers that don't need to be addressable by the bus ␊ |
342 | ␉␉// it may someday return as high 64 bits␊ |
343 | ␉␉inline UInt32 getFireWirePhysicalBufferBits( void )␊ |
344 | ␉␉␉{ return fAuxiliary->getFireWirePhysicalBufferBits(); }␊ |
345 | ␊ |
346 | ␉␉inline IOFWSimpleContiguousPhysicalAddressSpace * createSimpleContiguousPhysicalAddressSpace( vm_size_t size, IODirection direction )␊ |
347 | ␉␉␉{ return fAuxiliary->createSimpleContiguousPhysicalAddressSpace( size, direction ); }␊ |
348 | ␉␉␉␊ |
349 | ␉␉inline IOFWSimplePhysicalAddressSpace * createSimplePhysicalAddressSpace( vm_size_t size, IODirection direction )␊ |
350 | ␉␉␉{ return fAuxiliary->createSimplePhysicalAddressSpace( size, direction ); }␊ |
351 | ␊ |
352 | ␉␉virtual IOFWAsyncStreamCommand * createAsyncStreamCommand( UInt32 generation,␊ |
353 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉UInt32 channel, UInt32 sync, UInt32 tag, IOMemoryDescriptor *hostMem,␊ |
354 | ␉␉␉␉␉␉␉␉␉␉␉␉␉␉␉UInt32 size, int speed,FWAsyncStreamCallback completion, void *refcon, bool␉failOnReset) = 0;␊ |
355 | ␉␊ |
356 | ␉␉inline IOFWUserObjectExporter * getSessionRefExporter( void )␊ |
357 | ␉␉␉{ return fAuxiliary->getSessionRefExporter(); }␊ |
358 | ␉␊ |
359 | ␉private:␊ |
360 | ␉␊ |
361 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 0);␊ |
362 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 1);␊ |
363 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 2);␊ |
364 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 3);␊ |
365 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 4);␊ |
366 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 5);␊ |
367 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 6);␊ |
368 | ␉␉OSMetaClassDeclareReservedUsed(IOFireWireBus, 7);␊ |
369 | ␊ |
370 | };␊ |
371 | ␊ |
372 | #endif /* ! _IOKIT_IOFIREWIREBUS_H */␊ |
373 | ␊ |
374 |