00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if !defined (DRV_PMGR_H)
00044 #define DRV_PMGR_H
00045
00046
00047 #if defined (__cplusplus)
00048 extern "C" {
00049 #endif
00050
00051
00052
00053 #include <dsplink.h>
00054 #include <_dsplink.h>
00055 #include <procdefs.h>
00056 #include <linkcfgdefs.h>
00057 #include <_idm_usr.h>
00058 #if defined (POOL_COMPONENT)
00059 #include <pooldefs.h>
00060 #endif
00061 #if defined (MSGQ_COMPONENT)
00062 #include <msgqdefs.h>
00063 #endif
00064 #if defined (CHNL_COMPONENT)
00065 #include <chnldefs.h>
00066 #endif
00067 #if defined (RINGIO_COMPONENT)
00068 #include <_ringiodefs.h>
00069 #include <ringiodefs.h>
00070 #endif
00071 #if defined (MPCS_COMPONENT)
00072 #include <mpcsdefs.h>
00073 #endif
00074 #if defined (MPLIST_COMPONENT)
00075 #include <mplistdefs.h>
00076 #endif
00077
00078
00079 #if defined (DDSP_PROFILE)
00080 #include <profile.h>
00081 #endif
00082
00083
00084
00085
00086
00087
00088
00089
00090 #define BASE_CMD 0x6B00
00091
00092
00093
00094
00095
00096
00097
00098 #define PROC_BASE_CMD (BASE_CMD + 0x100)
00099 #define CMD_PROC_SETUP (PROC_BASE_CMD + 1)
00100 #define CMD_PROC_DESTROY (PROC_BASE_CMD + 2)
00101 #define CMD_PROC_START (PROC_BASE_CMD + 3)
00102 #define CMD_PROC_STOP (PROC_BASE_CMD + 4)
00103 #define CMD_PROC_LOAD (PROC_BASE_CMD + 5)
00104 #define CMD_PROC_LOADSECTION (PROC_BASE_CMD + 6)
00105 #define CMD_PROC_DETACH (PROC_BASE_CMD + 7)
00106 #define CMD_PROC_ATTACH (PROC_BASE_CMD + 8)
00107 #define CMD_PROC_GETSTATE (PROC_BASE_CMD + 9)
00108 #define CMD_PROC_CONTROL (PROC_BASE_CMD + 10)
00109 #define CMD_PROC_READ (PROC_BASE_CMD + 11)
00110 #define CMD_PROC_WRITE (PROC_BASE_CMD + 12)
00111 #define CMD_PROC_GETSYMBOLADDRESS (PROC_BASE_CMD + 13)
00112 #define CMD_PROC_ISLASTDESTROY (PROC_BASE_CMD + 14)
00113 #define CMD_PROC_ISLASTDETACH (PROC_BASE_CMD + 15)
00114
00115 #if defined (DDSP_PROFILE)
00116 #define CMD_PROC_INSTRUMENT (PROC_BASE_CMD + 16)
00117 #endif
00118
00119 #if defined (DDSP_DEBUG)
00120 #define CMD_PROC_DEBUG (PROC_BASE_CMD + 17)
00121 #endif
00122
00123 #define CMD_PROC_CLEANUP (PROC_BASE_CMD + 18)
00124 #define CMD_PROC_ADDRTRANSLATE (PROC_BASE_CMD + 19)
00125
00126
00127 #if defined (CHNL_COMPONENT)
00128
00129
00130
00131
00132
00133
00134 #define CHNL_BASE_CMD (BASE_CMD + 0x200)
00135 #define CMD_CHNL_CREATE (CHNL_BASE_CMD + 1)
00136 #define CMD_CHNL_DELETE (CHNL_BASE_CMD + 2)
00137 #define CMD_CHNL_ISSUE (CHNL_BASE_CMD + 3)
00138 #define CMD_CHNL_RECLAIM (CHNL_BASE_CMD + 4)
00139 #define CMD_CHNL_ALLOCATEBUFFER (CHNL_BASE_CMD + 5)
00140 #define CMD_CHNL_FREEBUFFER (CHNL_BASE_CMD + 6)
00141 #define CMD_CHNL_IDLE (CHNL_BASE_CMD + 7)
00142 #define CMD_CHNL_FLUSH (CHNL_BASE_CMD + 8)
00143 #define CMD_CHNL_CONTROL (CHNL_BASE_CMD + 9)
00144
00145
00146 #if defined (DDSP_PROFILE)
00147 #define CMD_CHNL_INSTRUMENT (CHNL_BASE_CMD + 10)
00148 #endif
00149
00150
00151 #if defined (DDSP_DEBUG)
00152 #define CMD_CHNL_DEBUG (CHNL_BASE_CMD + 11)
00153 #endif
00154 #endif
00155
00156
00157
00158
00159
00160
00161
00162
00163 #define DRV_BASE_CMD (BASE_CMD + 0x300)
00164 #if defined (CHNL_COMPONENT)
00165 #define CMD_DRV_GETCHNLMAPTABLE_ADDRESS (DRV_BASE_CMD + 1)
00166 #endif
00167
00168
00169 #if defined (MSGQ_COMPONENT)
00170
00171
00172
00173
00174
00175
00176 #define MSGQ_BASE_CMD (BASE_CMD + 0x400)
00177 #define CMD_MSGQ_TRANSPORTOPEN (MSGQ_BASE_CMD + 1)
00178 #define CMD_MSGQ_TRANSPORTCLOSE (MSGQ_BASE_CMD + 2)
00179 #define CMD_MSGQ_OPEN (MSGQ_BASE_CMD + 3)
00180 #define CMD_MSGQ_CLOSE (MSGQ_BASE_CMD + 4)
00181 #define CMD_MSGQ_LOCATE (MSGQ_BASE_CMD + 5)
00182 #define CMD_MSGQ_LOCATEASYNC (MSGQ_BASE_CMD + 6)
00183 #define CMD_MSGQ_RELEASE (MSGQ_BASE_CMD + 7)
00184 #define CMD_MSGQ_ALLOC (MSGQ_BASE_CMD + 8)
00185 #define CMD_MSGQ_FREE (MSGQ_BASE_CMD + 9)
00186 #define CMD_MSGQ_PUT (MSGQ_BASE_CMD + 10)
00187 #define CMD_MSGQ_GET (MSGQ_BASE_CMD + 11)
00188 #define CMD_MSGQ_SETERRORHANDLER (MSGQ_BASE_CMD + 12)
00189 #define CMD_MSGQ_COUNT (MSGQ_BASE_CMD + 13)
00190
00191
00192 #if defined (DDSP_PROFILE)
00193 #define CMD_MSGQ_INSTRUMENT (MSGQ_BASE_CMD + 14)
00194 #endif
00195
00196
00197 #if defined (DDSP_DEBUG)
00198 #define CMD_MSGQ_DEBUG (MSGQ_BASE_CMD + 15)
00199 #endif
00200
00201
00202 #endif
00203
00204
00205
00206
00207
00208
00209
00210 #define POOL_BASE_CMD (BASE_CMD + 0x600)
00211 #define CMD_POOL_OPEN (POOL_BASE_CMD + 1)
00212 #define CMD_POOL_CLOSE (POOL_BASE_CMD + 2)
00213 #define CMD_POOL_ALLOC (POOL_BASE_CMD + 3)
00214 #define CMD_POOL_FREE (POOL_BASE_CMD + 4)
00215 #define CMD_POOL_TRANSLATEADDR (POOL_BASE_CMD + 5)
00216 #define CMD_POOL_RECONFIGURE (POOL_BASE_CMD + 6)
00217 #define CMD_POOL_WRITEBACK (POOL_BASE_CMD + 7)
00218 #define CMD_POOL_INVALIDATE (POOL_BASE_CMD + 8)
00219
00220 #if defined (MPCS_COMPONENT)
00221
00222
00223
00224
00225
00226
00227 #define MPCS_BASE_CMD (BASE_CMD + 0x700)
00228 #define CMD_MPCS_MAPREGION (MPCS_BASE_CMD + 1)
00229 #define CMD_MPCS_UNMAPREGION (MPCS_BASE_CMD + 2)
00230 #endif
00231
00232
00233
00234
00235
00236
00237
00238 #define NOTIFY_BASE_CMD (BASE_CMD + 0x800)
00239 #define CMD_NOTIFY_INITIALIZE (NOTIFY_BASE_CMD + 1)
00240 #define CMD_NOTIFY_FINALIZE (NOTIFY_BASE_CMD + 2)
00241 #define CMD_NOTIFY_REGISTER (NOTIFY_BASE_CMD + 3)
00242 #define CMD_NOTIFY_UNREGISTER (NOTIFY_BASE_CMD + 4)
00243 #define CMD_NOTIFY_NOTIFY (NOTIFY_BASE_CMD + 5)
00244
00245 #if defined (DDSP_PROFILE)
00246 #define CMD_NOTIFY_INSTRUMENT (NOTIFY_BASE_CMD + 6)
00247 #endif
00248
00249
00250
00251
00252
00253
00254
00255 #define RINGIO_BASE_CMD (BASE_CMD + 0x810)
00256 #define CMD_RINGIO_MAPREGION (RINGIO_BASE_CMD + 1)
00257 #define CMD_RINGIO_UNMAPREGION (RINGIO_BASE_CMD + 2)
00258
00259
00260
00261
00262
00263
00264
00265 #define MPLIST_BASE_CMD (BASE_CMD + 0x820)
00266 #define CMD_MPLIST_MAPREGION (MPLIST_BASE_CMD + 1)
00267 #define CMD_MPLIST_UNMAPREGION (MPLIST_BASE_CMD + 2)
00268
00269
00270
00271
00272
00273
00274
00275 #define IDM_BASE_CMD (BASE_CMD + 0x850)
00276 #define CMD_IDM_INIT (IDM_BASE_CMD + 1)
00277 #define CMD_IDM_EXIT (IDM_BASE_CMD + 2)
00278 #define CMD_IDM_CREATE (IDM_BASE_CMD + 3)
00279 #define CMD_IDM_DELETE (IDM_BASE_CMD + 4)
00280 #define CMD_IDM_ACQUIREID (IDM_BASE_CMD + 5)
00281 #define CMD_IDM_RELEASEID (IDM_BASE_CMD + 6)
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 #define KERN_BASE_CMD (BASE_CMD + 0x870)
00292 #define CMD_KERN_MAP_IO_SPACE (KERN_BASE_CMD + 1)
00293 #define CMD_KERN_UNMAP_IO_SPACE (KERN_BASE_CMD + 2)
00294 #define CMD_KERN_MAP_PHYS_TO_USER (KERN_BASE_CMD + 3)
00295 #define CMD_KERN_UNMAP_PHYS_TO_USER (KERN_BASE_CMD + 4)
00296
00297
00298
00299
00300
00301
00302
00303
00304 #define DRV_INITIALIZE(handle) DRV_Initialize (handle, NULL)
00305
00306
00307
00308
00309
00310
00311
00312 #define DRV_FINALIZE(handle) DRV_Finalize (handle, NULL)
00313
00314
00315
00316
00317
00318
00319
00320 #define DRV_INVOKE(handle,cmd,arg1) DRV_Invoke (handle, cmd, arg1, NULL)
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335 typedef struct CMD_Args_tag {
00336 DSP_STATUS apiStatus ;
00337 union {
00338 struct {
00339 LINKCFG_Object * linkCfg ;
00340 } procSetupArgs ;
00341
00342 struct {
00343 Char8 dummy ;
00344 } procDestroyArgs ;
00345
00346 struct {
00347 ProcessorId procId ;
00348 } procStartArgs ;
00349
00350 struct {
00351 ProcessorId procId ;
00352 } procStopArgs ;
00353
00354 struct {
00355 ProcessorId procId ;
00356 Char8 * symbolName ;
00357 Uint32 * dspAddr ;
00358 } procGetSymbolAddressArgs ;
00359
00360 struct {
00361 ProcessorId procId ;
00362 PROC_Attrs * attr ;
00363 Uint32 * map ;
00364
00365 Void * prcsInfo ;
00366 } procAttachArgs ;
00367
00368 struct {
00369 ProcessorId procId ;
00370
00371 Void * prcsInfo ;
00372 } procDetachArgs ;
00373
00374 struct {
00375 ProcessorId procId ;
00376 Char8 * imagePath ;
00377 Uint32 argc ;
00378 Char8 ** argv ;
00379 } procLoadArgs ;
00380
00381 struct {
00382 ProcessorId procId ;
00383 Uint32 dspAddr ;
00384 Uint32 numBytes ;
00385 Pvoid buffer ;
00386 } procReadArgs ;
00387
00388 struct {
00389 ProcessorId procId ;
00390 Uint32 dspAddr ;
00391 Uint32 numBytes ;
00392 Pvoid buffer ;
00393 } procWriteArgs ;
00394
00395 struct {
00396 ProcessorId procId ;
00397 PROC_State * procState ;
00398 } procGetStateArgs ;
00399
00400 struct {
00401 ProcessorId procId ;
00402 Int32 cmd ;
00403 Pvoid arg ;
00404 } procControlArgs ;
00405
00406 struct {
00407 ProcessorId procId ;
00408 Char8 * imagePath ;
00409 Uint32 sectID ;
00410 } procLoadSectionArgs ;
00411
00412 struct {
00413 Bool lastDestroy ;
00414 } procIsLastDestroyArgs ;
00415
00416 struct {
00417 ProcessorId procId ;
00418 Bool lastDetach ;
00419 } procIsLastDetachArgs ;
00420
00421 #if defined (DDSP_PROFILE)
00422 struct {
00423 ProcessorId procId ;
00424 PROC_Instrument * procStats ;
00425 } procInstrumentArgs ;
00426 #endif
00427
00428 #if defined (DDSP_DEBUG)
00429 struct {
00430 ProcessorId procId ;
00431 } procDebugArgs ;
00432 #endif
00433
00434 struct {
00435 ProcessorId procId ;
00436 Uint32 bufAddr ;
00437 Uint32 * physAddr ;
00438 } procAddrTranslateArgs ;
00439
00440 #if defined (CHNL_COMPONENT)
00441 struct {
00442 ProcessorId procId ;
00443 ChannelId chnlId ;
00444 ChannelAttrs * attrs ;
00445 } chnlCreateArgs ;
00446
00447 struct {
00448 ProcessorId procId ;
00449 ChannelId chnlId ;
00450 } chnlDeleteArgs ;
00451
00452 struct {
00453 ProcessorId procId ;
00454 ChannelId chnlId ;
00455 ChannelIOInfo * ioReq ;
00456 } chnlIssueArgs ;
00457
00458 struct {
00459 ProcessorId procId ;
00460 ChannelId chnlId ;
00461 Uint32 timeout ;
00462 ChannelIOInfo * ioReq ;
00463 } chnlReclaimArgs ;
00464
00465 struct {
00466 ProcessorId procId ;
00467 ChannelId chnlId ;
00468 Char8 ** bufArray ;
00469 Uint32 size ;
00470 Uint32 numBufs ;
00471 } chnlAllocateBufferArgs ;
00472
00473 struct {
00474 ProcessorId procId ;
00475 ChannelId chnlId ;
00476 Char8 ** bufArray ;
00477 Uint32 numBufs ;
00478 } chnlFreeBufferArgs ;
00479
00480 struct {
00481 ProcessorId procId ;
00482 ChannelId chnlId ;
00483 } chnlFlushArgs ;
00484
00485 struct {
00486 ProcessorId procId ;
00487 ChannelId chnlId ;
00488 } chnlIdleArgs ;
00489
00490 struct {
00491 ProcessorId procId ;
00492 ChannelId chnlId ;
00493 Int32 cmd ;
00494 Pvoid arg ;
00495 } chnlControlArgs ;
00496
00497 #if defined (DDSP_PROFILE)
00498 struct {
00499 ProcessorId procId ;
00500 ChannelId chnlId ;
00501 CHNL_Instrument * chnlStats ;
00502 } chnlInstrumentArgs ;
00503 #endif
00504
00505 #if defined (DDSP_DEBUG)
00506 struct {
00507 ProcessorId procId ;
00508 ChannelId chnlId ;
00509 } chnlDebugArgs ;
00510 #endif
00511 #endif
00512
00513 struct {
00514 Void * phyAddr ;
00515 } drvPhyAddrArgs ;
00516
00517 #if defined (MSGQ_COMPONENT)
00518 struct {
00519 ProcessorId procId ;
00520 Pvoid attrs ;
00521 } msgqTransportOpenArgs ;
00522
00523 struct {
00524 ProcessorId procId ;
00525 } msgqTransportCloseArgs ;
00526
00527 struct {
00528 Pstr queueName ;
00529 MSGQ_Queue * msgqQueue ;
00530 MSGQ_Attrs * attrs ;
00531
00532 Void * prcsInfo ;
00533 } msgqOpenArgs ;
00534
00535 struct {
00536 MSGQ_Queue msgqQueue ;
00537
00538 Void * prcsInfo ;
00539 } msgqCloseArgs ;
00540
00541 struct {
00542 Pstr queueName ;
00543 MSGQ_Queue * msgqQueue ;
00544 MSGQ_LocateAttrs * attrs ;
00545 } msgqLocateArgs ;
00546
00547 struct {
00548 Pstr queueName ;
00549 MSGQ_Queue replyQueue ;
00550 MSGQ_LocateAsyncAttrs * attrs ;
00551 } msgqLocateAsyncArgs ;
00552
00553 struct {
00554 MSGQ_Queue msgqQueue ;
00555 } msgqReleaseArgs ;
00556
00557 struct {
00558 PoolId poolId ;
00559 Uint16 size ;
00560 Uint32 msgAddr ;
00561 } msgqAllocArgs ;
00562
00563 struct {
00564 MSGQ_Msg msg ;
00565 } msgqFreeArgs ;
00566
00567 struct {
00568 MSGQ_Queue msgqQueue ;
00569 MSGQ_Msg msg ;
00570 } msgqPutArgs ;
00571
00572 struct {
00573 Uint32 poolId ;
00574 MSGQ_Queue msgqQueue ;
00575 Uint32 timeout ;
00576 Uint32 msgAddr ;
00577 } msgqGetArgs ;
00578
00579 struct {
00580 MSGQ_Queue errorQueue ;
00581 PoolId poolId ;
00582 } msgqSetErrorHandlerArgs ;
00583
00584 struct {
00585 MSGQ_Queue msgqQueue ;
00586 Uint16 * count ;
00587 } msgqCountArgs ;
00588
00589 #if defined (DDSP_PROFILE)
00590 struct {
00591 MSGQ_Queue msgqQueue ;
00592 MSGQ_Instrument * retVal ;
00593 } msgqInstrumentArgs ;
00594 #endif
00595
00596 #if defined (DDSP_DEBUG)
00597 struct {
00598 MSGQ_Queue msgqQueue ;
00599 } msgqDebugArgs ;
00600 #endif
00601 #endif
00602
00603 struct {
00604 PoolId poolId ;
00605 Pvoid params ;
00606 } poolOpenArgs ;
00607
00608 struct {
00609 PoolId poolId ;
00610 } poolCloseArgs ;
00611
00612 #if defined (POOL_COMPONENT)
00613 struct {
00614 PoolId poolId ;
00615 Uint32 size ;
00616 Pvoid * bufPtr ;
00617 } poolAllocArgs ;
00618
00619 struct {
00620 PoolId poolId ;
00621 Uint32 size ;
00622 Pvoid bufPtr ;
00623 } poolFreeArgs ;
00624
00625 struct {
00626 PoolId poolId ;
00627 Pvoid * dstAddr ;
00628 AddrType dstAddrType ;
00629 Pvoid srcAddr ;
00630 AddrType srcAddrType ;
00631 } poolTranslateAddrArgs ;
00632
00633 struct {
00634 PoolId poolId ;
00635 Uint32 size ;
00636 Pvoid bufPtr ;
00637 } poolWBArgs ;
00638
00639 struct {
00640 PoolId poolId ;
00641 Uint32 size ;
00642 Pvoid bufPtr ;
00643 } poolInvArgs ;
00644 #endif
00645
00646 #if defined (RINGIO_COMPONENT)
00647 struct {
00648 RingIO_MemInfo ringioRegionArgs ;
00649 } ringIoArgs ;
00650 #endif
00651
00652 #if defined (MPLIST_COMPONENT)
00653 struct {
00654 MPLIST_MemInfo mplistRegionArgs ;
00655 } mplistArgs ;
00656 #endif
00657
00658 #if defined (MPCS_COMPONENT)
00659 struct {
00660 MPCS_MemInfo mpcsRegionArgs ;
00661 } mpcsMapArgs ;
00662 #endif
00663
00664 #if defined (NOTIFY_COMPONENT)
00665 struct {
00666 ProcessorId dspId ;
00667 } notifyInitializeArgs ;
00668
00669 struct {
00670 ProcessorId dspId ;
00671 } notifyFinalizeArgs ;
00672
00673 struct {
00674 ProcessorId dspId ;
00675 Uint32 ipsId ;
00676 Uint32 eventNo ;
00677 Pvoid fnNotifyCbck ;
00678 Pvoid cbckArg ;
00679 } notifyRegisterArgs ;
00680
00681 struct {
00682 ProcessorId dspId ;
00683 Uint32 ipsId ;
00684 Uint32 eventNo ;
00685 Pvoid fnNotifyCbck ;
00686 Pvoid cbckArg ;
00687 } notifyUnregisterArgs ;
00688
00689 struct {
00690 ProcessorId dspId ;
00691 Uint32 ipsId ;
00692 Uint32 eventNo ;
00693 Uint32 payload ;
00694 } notifyNotifyArgs ;
00695 #endif
00696
00697 #if defined (DDSP_PROFILE)
00698 struct {
00699 ProcessorId dspId ;
00700 Uint32 ipsId ;
00701 IPS_Instrument * ipsStats ;
00702 } ipsInstrumentArgs ;
00703 #endif
00704
00705 struct {
00706 Uint32 key ;
00707 IDM_Attrs * attrs ;
00708 } idmCreateArgs ;
00709
00710 struct {
00711 Uint32 key ;
00712 } idmDeleteArgs ;
00713
00714 struct {
00715 Uint32 key ;
00716 Pstr idKey ;
00717 Uint32 * id ;
00718 } idmAcquireIdArgs ;
00719
00720 struct {
00721 Uint32 key ;
00722 Uint32 id ;
00723 } idmReleaseIdArgs ;
00724
00725 struct {
00726 Void * PhysicalAddress;
00727 Uint32 NumberOfBytes;
00728 Bool CacheEnable;
00729 Void * retVal ;
00730 } kernMapIoSpaceArgs;
00731
00732 struct {
00733 Void *BaseAddress;
00734 Uint32 NumberOfBytes;
00735 } kernUnmapIoSpaceArgs;
00736
00737 struct {
00738 Uint32 PhysicalAddress;
00739 Uint32 size;
00740 Uint32 UserAddress;
00741 Bool CacheEnable;
00742 } kernMapPhysToUser;
00743
00744 struct {
00745 Uint32 UserAddress;
00746 Uint32 size;
00747 } kernUnmapPhysToUser;
00748 } apiArgs ;
00749 } CMD_Args ;
00750
00751
00752 #if defined (__cplusplus)
00753 }
00754 #endif
00755
00756
00757 #endif