• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * dspbridge/mpu_api/inc/dbdefs.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Copyright (C) 2007 Texas Instruments, Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation version 2.1 of the License.
11  *
12  * This program is distributed .as is. WITHOUT ANY WARRANTY of any kind,
13  * whether express or implied; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  */
17 
18 
19 
20 /*
21  *  ======== dbdefs.h ========
22  *  Description:
23  *      Global definitions and constants for DSP/BIOS Bridge.
24  *
25  *! Revision History:
26  *! ================
27  *! 19-Apr-2004 sb  Aligned DMM definitions with Symbian
28  *! 08-Mar-2004 sb  Added MAPATTR & ELEM_SIZE for Dynamic Memory Mapping feature
29  *! 09-Feb-2004 vp  Added processor ID numbers for DSP and IVA
30  *! 06-Feb-2003 kc  Removed DSP_POSTMESSAGE. Updated IsValid*Event macros.
31  *! 22-Nov-2002 gp  Cleaned up comments, formatting.
32  *!                 Removed unused DSP_ENUMLASTNODE define.
33  *! 13-Feb-2002 jeh Added uSysStackSize to DSP_NDBPROPS.
34  *! 23-Jan-2002 ag  Added #define DSP_SHMSEG0.
35  *! 12-Dec-2001 ag  Added DSP_ESTRMMODE error code.
36  *! 04-Dec-2001 jeh Added DSP_ENOTCONNECTED error code.
37  *! 10-Dec-2001 kc: Modified macros and definitions to disable DSP_POSTMESSAGE.
38  *! 01-Nov-2001 jeh Added DSP_EOVERLAYMEMORY.
39  *! 18-Oct-2001 ag  Added DSP_STRMMODE type.
40  *!                 Added DSP_ENOTSHAREDMEM.
41  *! 21-Sep-2001 ag  Added additional error codes.
42  *! 07-Jun-2001 sg  Made DSPStream_AllocateBuffer fxn name plural.
43  *! 11-May-2001 jeh Changed DSP_NODE_MIN_PRIORITY from 0 to 1. Removed hNode
44  *!                 from DSP_NODEINFO.
45  *! 02-Apr-2001 sg  Added missing error codes, rearranged codes, switched to
46  *!             hex offsets, renamed some codes to match API spec.
47  *! 16-Jan-2001 jeh Added DSP_ESYMBOL, DSP_EUUID.
48  *! 13-Feb-2001 kc: DSP/BIOS Bridge name updates.
49  *! 05-Dec-2000 ag: Added DSP_RMSxxx user available message command codes.
50  *! 09-Nov-2000 rr: Added DSP_PROCEESORRESTART define; Removed DSP_PBUFFER.
51  *!                 Added DSP_DCD_ENOAUTOREGISTER, DSP_EUSER1-16, DSP_ESTRMFUL
52  *!                 Removed DSP_EDONE. Macros's modified.
53  *! 23-Oct-2000 jeh Replaced DSP_STREAMSTATECHANGE with DSP_STREAMDONE.
54  *! 09-Oct-2000 jeh Updated to version 0.9 DSP Bridge API spec.
55  *! 29-Sep-2000 kc  Added error codes for DCD and REG to simplify use of
56  *!                 these codes within the RM module.
57  *! 27-Sep-2000 jeh Added segid, alignment, uNumBufs to DSP_STREAMATTRIN.
58  *! 29-Aug-2000 jeh Added DSP_NODETYPE enum, changed DSP_EALREADYATTACHED to
59  *!                 DSP_EALREADYCONNECTED. Changed scStreamConnection[1]
60  *!                 to scStreamConnection[16] in DSP_NODEINFO structure.
61  *!                 Added DSP_NOTIFICATION, DSP_STRMATTR. PSTRING changed
62  *!                 back to TCHAR * and moved to dbtype.h.
63  *! 11-Aug-2000 rr: Macros to check valid events and notify masks added.
64  *! 09-Aug-2000 rr: Changed PSTRING to *CHAR
65  *! 07-Aug-2000 rr: PROC_IDLE/SYNCINIT/UNKNOWN state removed.
66  *! 20-Jul-2000 rr: Updated to version 0.8
67  *! 17-Jul-2000 rr: New PROC states added to the DSP_PROCSTATE.
68  *! 27-Jun-2000 rr: Created from dspapi.h
69  */
70 
71 #ifndef DBDEFS_
72 #define DBDEFS_
73 
74 #include <dbtype.h>		/* GPP side type definitions           */
75 #include <std.h>		/* DSP/BIOS type definitions           */
76 #include <rms_sh.h>		/* Types shared between GPP and DSP    */
77 
78 #ifdef __cplusplus
79 extern "C" {
80 #endif
81 
82 #define PG_SIZE_4K 4096
83 #define PG_MASK(pg_size) (~((pg_size)-1))
84 #define PG_ALIGN_LOW(addr, pg_size) ((addr) & PG_MASK(pg_size))
85 #define PG_ALIGN_HIGH(addr, pg_size) (((addr)+(pg_size)-1) & PG_MASK(pg_size))
86 
87 /* API return value and calling convention */
88 #define DBAPI                       DSP_STATUS CDECL
89 
90 /* Infinite time value for the uTimeout parameter to DSPStream_Select() */
91 #define DSP_FOREVER                 (-1)
92 
93 /* Maximum length of node name, used in DSP_NDBPROPS */
94 #define DSP_MAXNAMELEN              32
95 
96 /* uNotifyType values for the RegisterNotify() functions. */
97 #define DSP_SIGNALEVENT             0x00000001
98 
99 /* Types of events for processors */
100 #define DSP_PROCESSORSTATECHANGE    0x00000001
101 #define DSP_PROCESSORATTACH         0x00000002
102 #define DSP_PROCESSORDETACH         0x00000004
103 #define DSP_PROCESSORRESTART        0x00000008
104 
105 /* DSP exception events (DSP/BIOS and DSP MMU fault) */
106 #define DSP_MMUFAULT                0x00000010
107 #define DSP_SYSERROR                0x00000020
108 
109 /* IVA exception events (IVA MMU fault) */
110 #define IVA_MMUFAULT                0x00000040
111 /* Types of events for nodes */
112 #define DSP_NODESTATECHANGE         0x00000100
113 #define DSP_NODEMESSAGEREADY        0x00000200
114 
115 /* Types of events for streams */
116 #define DSP_STREAMDONE              0x00001000
117 #define DSP_STREAMIOCOMPLETION      0x00002000
118 
119 /* Handle definition representing the GPP node in DSPNode_Connect() calls */
120 #define DSP_HGPPNODE                0xFFFFFFFF
121 
122 /* Node directions used in DSPNode_Connect() */
123 #define DSP_TONODE                  1
124 #define DSP_FROMNODE                2
125 
126 /* Define Node Minimum and Maximum Priorities */
127 #define DSP_NODE_MIN_PRIORITY       1
128 #define DSP_NODE_MAX_PRIORITY       15
129 
130 /* Pre-Defined Message Command Codes available to user: */
131 #define DSP_RMSUSERCODESTART RMS_USER	/* Start of RMS user cmd codes */
132 #define DSP_RMSUSERCODEEND RMS_USER + RMS_MAXUSERCODES;	/* end of user codes */
133 #define DSP_RMSBUFDESC RMS_BUFDESC	/* MSG contains SM buffer description */
134 
135 /* Shared memory identifier for MEM segment named "SHMSEG0" */
136 #define DSP_SHMSEG0     (UINT)(-1)
137 
138 /* Processor ID numbers */
139 #define DSP_UNIT    0
140 #define IVA_UNIT    1
141 
142 #define DSPWORD       BYTE
143 #define DSPWORDSIZE     sizeof(DSPWORD)
144 
145 /* Success & Failure macros  */
146 #define DSP_SUCCEEDED(Status)      ((INT)(Status) >= 0)
147 #define DSP_FAILED(Status)         ((INT)(Status) < 0)
148 
149 /* Power control enumerations */
150 #define PROC_PWRCONTROL             0x8070
151 
152 #define PROC_PWRMGT_ENABLE          (PROC_PWRCONTROL + 0x3)
153 #define PROC_PWRMGT_DISABLE         (PROC_PWRCONTROL + 0x4)
154 
155 /* Bridge Code Version */
156 #define BRIDGE_VERSION_CODE         333
157 
158 #define    MAX_PROFILES     16
159 
160 /* Types defined for 'Bridge API */
161 	typedef DWORD DSP_STATUS;	/* API return code type         */
162 
163 	typedef HANDLE DSP_HNODE;	/* Handle to a DSP Node object  */
164 	typedef HANDLE DSP_HPROCESSOR;	/* Handle to a Processor object */
165 	typedef HANDLE DSP_HSTREAM;	/* Handle to a Stream object    */
166 
167 	typedef ULONG DSP_PROCFAMILY;	/* Processor family             */
168 	typedef ULONG DSP_PROCTYPE;	/* Processor type (w/in family) */
169 	typedef ULONG DSP_RTOSTYPE;	/* Type of DSP RTOS             */
170 
171 	typedef ULONG DSP_RESOURCEMASK;	/* Mask for processor resources */
172 	typedef ULONG DSP_ERRORMASK;	/* Mask for various error types */
173 
174 /* Handy Macros */
175 #define IsValidProcEvent(x)    (((x) == 0) || (((x) & (DSP_PROCESSORSTATECHANGE | \
176                                     DSP_PROCESSORATTACH | \
177                                     DSP_PROCESSORDETACH | \
178                                     DSP_PROCESSORRESTART | \
179                                     DSP_NODESTATECHANGE | \
180                                     DSP_STREAMDONE | \
181                                     DSP_STREAMIOCOMPLETION | \
182                                     DSP_MMUFAULT | \
183                                     DSP_SYSERROR)) && \
184                                 !((x) & ~(DSP_PROCESSORSTATECHANGE | \
185                                     DSP_PROCESSORATTACH | \
186                                     DSP_PROCESSORDETACH | \
187                                     DSP_PROCESSORRESTART | \
188                                     DSP_NODESTATECHANGE | \
189                                     DSP_STREAMDONE | \
190                                     DSP_STREAMIOCOMPLETION | \
191                                     DSP_MMUFAULT | \
192                                     DSP_SYSERROR))))
193 
194 #define IsValidNodeEvent(x)    (((x) == 0) || (((x) & (DSP_NODESTATECHANGE | \
195                                 DSP_NODEMESSAGEREADY)) && \
196                                 !((x) & ~(DSP_NODESTATECHANGE | \
197                                 DSP_NODEMESSAGEREADY))))
198 
199 #define IsValidStrmEvent(x)     (((x) == 0) || (((x) & (DSP_STREAMDONE | \
200                                 DSP_STREAMIOCOMPLETION)) && \
201                                 !((x) & ~(DSP_STREAMDONE | \
202                                 DSP_STREAMIOCOMPLETION))))
203 
204 #define IsValidNotifyMask(x)   ((x) & DSP_SIGNALEVENT)
205 
206 /* The Node UUID structure */
207 	struct DSP_UUID {
208 		ULONG ulData1;
209 		USHORT usData2;
210 		USHORT usData3;
211 		BYTE ucData4;
212 		BYTE ucData5;
213 		UCHAR ucData6[6];
214 	};
215 	/*DSP_UUID, *DSP_HUUID;*/
216 
217 /* DCD types */
218 	typedef enum {
219 		DSP_DCDNODETYPE,
220 		DSP_DCDPROCESSORTYPE,
221 		DSP_DCDLIBRARYTYPE,
222 		DSP_DCDCREATELIBTYPE,
223 		DSP_DCDEXECUTELIBTYPE,
224 		DSP_DCDDELETELIBTYPE
225 	} DSP_DCDOBJTYPE;
226 
227 /* Processor states */
228 	typedef enum {
229 		PROC_STOPPED,
230 		PROC_LOADED,
231 		PROC_RUNNING,
232 		PROC_ERROR
233 	} DSP_PROCSTATE;
234 
235 /* Node types */
236 	typedef enum {
237 		NODE_DEVICE,
238 		NODE_TASK,
239 		NODE_DAISSOCKET,
240 		NODE_MESSAGE
241 	} DSP_NODETYPE;
242 
243 /* Node states */
244 	typedef enum {
245 		NODE_ALLOCATED,
246 		NODE_CREATED,
247 		NODE_RUNNING,
248 		NODE_PAUSED,
249 		NODE_DONE
250 	} DSP_NODESTATE;
251 
252 /* Stream states */
253 	typedef enum {
254 		STREAM_IDLE,
255 		STREAM_READY,
256 		STREAM_PENDING,
257 		STREAM_DONE
258 	} DSP_STREAMSTATE;
259 
260 /* Stream connect types */
261 	typedef enum {
262 		CONNECTTYPE_NODEOUTPUT,
263 		CONNECTTYPE_GPPOUTPUT,
264 		CONNECTTYPE_NODEINPUT,
265 		CONNECTTYPE_GPPINPUT
266 	} DSP_CONNECTTYPE;
267 
268 /* Stream mode types */
269 	typedef enum {
270 		STRMMODE_PROCCOPY,	/* Processor(s) copy stream data payloads */
271 		STRMMODE_ZEROCOPY,	/* Stream buffer pointers swapped, no data copied */
272 		STRMMODE_LDMA,	/* Local DMA : OMAP's System-DMA device */
273 		STRMMODE_RDMA	/* Remote DMA: OMAP's DSP-DMA device */
274 	} DSP_STRMMODE;
275 
276 /* Stream DMA priority. Only Low and High supported */
277 	typedef enum {
278 		DMAPRI_LOW,
279 		DMAPRI_HIGH
280 	} DSP_DMAPRIORITY;
281 
282 /* Resource Types */
283 	typedef enum {
284 		DSP_RESOURCE_DYNDARAM = 0,
285 		DSP_RESOURCE_DYNSARAM,
286 		DSP_RESOURCE_DYNEXTERNAL,
287 		DSP_RESOURCE_DYNSRAM,
288 		DSP_RESOURCE_PROCLOAD
289 	} DSP_RESOURCEINFOTYPE;
290 
291 /* Memory Segment Types */
292 	typedef enum {
293 		DSP_DYNDARAM = 0,
294 		DSP_DYNSARAM,
295 		DSP_DYNEXTERNAL,
296 		DSP_DYNSRAM
297 	} DSP_MEMTYPE;
298 
299 /* Memory Flush Types */
300        typedef enum {
301 		PROC_INVALIDATE_MEM = 0,
302 		PROC_WRITEBACK_MEM,
303 		PROC_WRITEBACK_INVALIDATE_MEM,
304 	} DSP_FLUSHTYPE;
305 
306 /* Memory Segment Status Values */
307 	 struct DSP_MEMSTAT {
308 		ULONG ulSize;
309 		ULONG ulTotalFreeSize;
310 		ULONG ulLenMaxFreeBlock;
311 		ULONG ulNumFreeBlocks;
312 		ULONG ulNumAllocBlocks;
313 	} ;
314 
315 /* Processor Load information Values */
316 	 struct DSP_PROCLOADSTAT {
317 		ULONG uCurrLoad;
318 		ULONG uPredictedLoad;
319 		ULONG uCurrDspFreq;
320 		ULONG uPredictedFreq;
321 	} ;
322 
323 /* Attributes for STRM connections between nodes */
324 	struct DSP_STRMATTR {
325 		UINT uSegid;	/* Memory segment on DSP to allocate buffers */
326 		UINT uBufsize;	/* Buffer size (DSP words) */
327 		UINT uNumBufs;	/* Number of buffers */
328 		UINT uAlignment;	/* Buffer alignment */
329 		UINT uTimeout;	/* Timeout for blocking STRM calls */
330 		UINT lMode;	/* mode of stream when opened */
331 		UINT uDMAChnlId;	/* DMA chnl id if DSP_STRMMODE is LDMA or RDMA */
332 		UINT uDMAPriority;	/* DMA channel priority 0=lowest, >0=high */
333 	} ;
334 
335 /* The DSP_CBDATA structure */
336 	struct DSP_CBDATA {
337 		ULONG cbData;
338 		BYTE cData[1];
339 	} ;
340 	/*DSP_CBDATA, *DSP_HCBDATA;*/
341 
342 /* The DSP_MSG structure */
343 	struct DSP_MSG {
344 		DWORD dwCmd;
345 		DWORD dwArg1;
346 		DWORD dwArg2;
347 	} ;
348 	/*DSP_MSG, *DSP_HMSG;*/
349 
350 /* The DSP_RESOURCEREQMTS structure for node's resource requirements  */
351 	struct DSP_RESOURCEREQMTS {
352 		DWORD cbStruct;
353 		UINT uStaticDataSize;
354 		UINT uGlobalDataSize;
355 		UINT uProgramMemSize;
356 		UINT uWCExecutionTime;
357 		UINT uWCPeriod;
358 		UINT uWCDeadline;
359 		UINT uAvgExectionTime;
360 		UINT uMinimumPeriod;
361 	} ;
362 	/*DSP_RESOURCEREQMTS, *DSP_HRESOURCEREQMTS;*/
363 
364 /*
365  * The DSP_STREAMCONNECT structure describes a stream connection
366  * between two nodes, or between a node and the GPP
367  */
368 	struct DSP_STREAMCONNECT {
369 		DWORD cbStruct;
370 		DSP_CONNECTTYPE lType;
371 		UINT uThisNodeStreamIndex;
372 		DSP_HNODE hConnectedNode;
373 		struct DSP_UUID uiConnectedNodeID;
374 		UINT uConnectedNodeStreamIndex;
375 	} ;
376 	/*DSP_STREAMCONNECT, *DSP_HSTREAMCONNECT;*/
377 
378 	struct DSP_NODEPROFS {
379 		UINT ulHeapSize;
380 	} ;
381 	/*DSP_NODEPROFS, *DSP_HNODEPROFS;*/
382 
383 /* The DSP_NDBPROPS structure reports the attributes of a node */
384 	struct DSP_NDBPROPS {
385 		DWORD cbStruct;
386 		struct DSP_UUID uiNodeID;
387 		CHARACTER acName[DSP_MAXNAMELEN];
388 		DSP_NODETYPE uNodeType;
389 		UINT bCacheOnGPP;
390 		struct DSP_RESOURCEREQMTS dspResourceReqmts;
391 		INT iPriority;
392 		UINT uStackSize;
393 		UINT uSysStackSize;
394 		UINT uStackSeg;
395 		UINT uMessageDepth;
396 		UINT uNumInputStreams;
397 		UINT uNumOutputStreams;
398 		UINT uTimeout;
399 		UINT uCountProfiles;	/* Number of supported profiles */
400 		/* Array of profiles */
401 		struct DSP_NODEPROFS aProfiles[MAX_PROFILES];
402 		UINT uStackSegName; /* Stack Segment Name */
403 	} ;
404 	/*DSP_NDBPROPS, *DSP_HNDBPROPS;*/
405 
406     /* The DSP_NODEATTRIN structure describes the attributes of a node client */
407     struct DSP_NODEATTRIN {
408             DWORD cbStruct;
409             INT iPriority;
410             UINT uTimeout;
411             UINT    uProfileID;
412 			/* Reserved, for Bridge Internal use only */
413             UINT    uHeapSize;
414             PVOID   pGPPVirtAddr; /* Reserved, for Bridge Internal use only */
415         } ;
416 	/*DSP_NODEATTRIN, *DSP_HNODEATTRIN;*/
417 
418 /* The DSP_NODEINFO structure is used to retrieve information about a node */
419 	struct DSP_NODEINFO {
420 		DWORD cbStruct;
421 		struct DSP_NDBPROPS nbNodeDatabaseProps;
422 		UINT uExecutionPriority;
423 		DSP_NODESTATE nsExecutionState;
424 		DSP_HNODE hDeviceOwner;
425 		UINT uNumberStreams;
426 		struct DSP_STREAMCONNECT scStreamConnection[16];
427 		UINT uNodeEnv;
428 	} ;
429 	/*DSP_NODEINFO, *DSP_HNODEINFO;*/
430 
431 /* The DSP_NODEATTR structure describes the attributes of a node */
432 	struct DSP_NODEATTR {
433 		DWORD cbStruct;
434 		struct DSP_NODEATTRIN inNodeAttrIn;
435 		ULONG uInputs;
436 		ULONG uOutputs;
437 		struct DSP_NODEINFO iNodeInfo;
438 	} ;
439 	/*DSP_NODEATTR, *DSP_HNODEATTR;*/
440 
441 /*
442  *  Notification type: either the name of an opened event, or an event or
443  *  window handle.
444  */
445 	struct DSP_NOTIFICATION {
446 		PSTRING psName;
447 		HANDLE handle;
448 	} ;
449 	/*DSP_NOTIFICATION, *DSP_HNOTIFICATION;*/
450 
451 /* The DSP_PROCESSORATTRIN structure describes the attributes of a processor */
452 	struct DSP_PROCESSORATTRIN{
453 		DWORD cbStruct;
454 		UINT uTimeout;
455 	} ;
456 	/*DSP_PROCESSORATTRIN, *DSP_HPROCESSORATTRIN;*/
457 
458 	enum chipTypes {
459 		DSPTYPE_55 = 6,
460 		IVA_ARM7 = 0x97,
461 		DSPTYPE_64 = 0x99
462 	};
463 
464 /*
465  * The DSP_PROCESSORINFO structure describes basic capabilities of a
466  * DSP processor
467  */
468 	struct DSP_PROCESSORINFO {
469 		DWORD cbStruct;
470 		DSP_PROCFAMILY uProcessorFamily;
471 		DSP_PROCTYPE uProcessorType;
472 		UINT uClockRate;
473 		ULONG ulInternalMemSize;
474 		ULONG ulExternalMemSize;
475 		UINT uProcessorID;
476 		DSP_RTOSTYPE tyRunningRTOS;
477 		INT nNodeMinPriority;
478 		INT nNodeMaxPriority;
479 	} ;
480 	/*DSP_PROCESSORINFO, *DSP_HPROCESSORINFO;*/
481 
482 /* Error information of last DSP exception signalled to the GPP */
483 	struct DSP_ERRORINFO {
484 		DWORD dwErrMask;
485 		DWORD dwVal1;
486 		DWORD dwVal2;
487 		DWORD dwVal3;
488 	} ;
489 	/*DSP_ERRORINFO;*/
490 
491 /* The DSP_PROCESSORSTATE structure describes the state of a DSP processor */
492 	struct DSP_PROCESSORSTATE {
493 		DWORD cbStruct;
494 		DSP_PROCSTATE iState;
495 		struct DSP_ERRORINFO errInfo;
496 	} ;
497 	/*DSP_PROCESSORSTATE, *DSP_HPROCESSORSTATE;*/
498 
499 /*
500  * The DSP_RESOURCEINFO structure is used to retrieve information about a
501  * processor's resources
502  */
503 	struct DSP_RESOURCEINFO {
504 		DWORD cbStruct;
505 		DSP_RESOURCEINFOTYPE uResourceType;
506 		union {
507 			ULONG ulResource;
508 			struct DSP_MEMSTAT memStat;
509 			struct DSP_PROCLOADSTAT procLoadStat;
510 		} result;
511 	} ;
512 	/*DSP_RESOURCEINFO, *DSP_HRESOURCEINFO;*/
513 
514 /*
515  * The DSP_STREAMATTRIN structure describes the attributes of a stream,
516  * including segment and alignment of data buffers allocated with
517  * DSPStream_AllocateBuffers(), if applicable
518  */
519 	struct DSP_STREAMATTRIN {
520 		DWORD cbStruct;
521 		UINT uTimeout;
522 		UINT uSegment;
523 		UINT uAlignment;
524 		UINT uNumBufs;
525 		UINT lMode;
526 		UINT uDMAChnlId;
527 		UINT uDMAPriority;
528 	} ;
529 	/*DSP_STREAMATTRIN, *DSP_HSTREAMATTRIN;*/
530 
531 /* The DSP_BUFFERATTR structure describes the attributes of a data buffer */
532 	struct DSP_BUFFERATTR {
533 		DWORD cbStruct;
534 		UINT uSegment;
535 		UINT uAlignment;
536 	} ;
537 	/*DSP_BUFFERATTR, *DSP_HBUFFERATTR;*/
538 
539 /*
540  *  The DSP_STREAMINFO structure is used to retrieve information
541  *  about a stream.
542  */
543 	struct DSP_STREAMINFO {
544 		DWORD cbStruct;
545 		UINT uNumberBufsAllowed;
546 		UINT uNumberBufsInStream;
547 		ULONG ulNumberBytes;
548 		HANDLE hSyncObjectHandle;
549 		DSP_STREAMSTATE ssStreamState;
550 	} ;
551 	/*DSP_STREAMINFO, *DSP_HSTREAMINFO;*/
552 
553 /* DMM MAP attributes
554 It is a bit mask with each bit value indicating a specific attribute
555 bit 0 - GPP address type (user virtual=0, physical=1)
556 bit 1 - MMU Endianism (Big Endian=1, Little Endian=0)
557 bit 2 - MMU mixed page attribute (Mixed/ CPUES=1, TLBES =0)
558 bit 3 - MMU element size = 8bit (valid only for non mixed page entries)
559 bit 4 - MMU element size = 16bit (valid only for non mixed page entries)
560 bit 5 - MMU element size = 32bit (valid only for non mixed page entries)
561 bit 6 - MMU element size = 64bit (valid only for non mixed page entries)
562 */
563 
564 /* Types of mapping attributes */
565 
566 /* MPU address is virtual and needs to be translated to physical addr */
567 #define DSP_MAPVIRTUALADDR          0x00000000
568 #define DSP_MAPPHYSICALADDR         0x00000001
569 
570 /* Mapped data is big endian */
571 #define DSP_MAPBIGENDIAN            0x00000002
572 #define DSP_MAPLITTLEENDIAN         0x00000000
573 
574 /* Element size is based on DSP r/w access size */
575 #define DSP_MAPMIXEDELEMSIZE        0x00000004
576 
577 /*
578  * Element size for MMU mapping (8, 16, 32, or 64 bit)
579  * Ignored if DSP_MAPMIXEDELEMSIZE enabled
580  */
581 #define DSP_MAPELEMSIZE8            0x00000008
582 #define DSP_MAPELEMSIZE16           0x00000010
583 #define DSP_MAPELEMSIZE32           0x00000020
584 #define DSP_MAPELEMSIZE64           0x00000040
585 
586 #define DSP_MAPVMALLOCADDR         0x00000080
587 
588 #define GEM_CACHE_LINE_SIZE     128
589 #define GEM_L1P_PREFETCH_SIZE   128
590 
591 #ifdef __cplusplus
592 }
593 #endif
594 #endif				/* DBDEFS_ */
595