00001 00043 #if !defined (MPCSDEFS_H) 00044 #define MPCSDEFS_H 00045 00046 00047 /* ----------------------------------- DSP/BIOS LINK Headers */ 00048 #include <dsplink.h> 00049 00050 00051 #if defined (__cplusplus) 00052 extern "C" { 00053 #endif /* defined (__cplusplus) */ 00054 00055 00062 #define MPCS_INVALID_ID (Uint32) -1 00063 00071 #define MPCS_RESV_LOCKNAME "DSPLINK_MPCS_RESV" 00072 00080 #define MPCS_RESV_LOCKNAMELEN 17 00081 00082 00094 typedef struct MPCS_Attrs_tag { 00095 Uint16 poolId ; 00096 } MPCS_Attrs ; 00097 00126 typedef struct MPCS_ProcObj_tag { 00127 Uint32 localLock ; 00128 Uint16 flag ; 00129 Uint16 freeObject ; 00130 Uint32 mpcsEntryAddr ; 00131 #if defined (DDSP_PROFILE) 00132 Uint16 conflicts ; 00133 Uint16 numCalls ; 00134 #endif 00135 #if defined (DSP_TSK_MODE) 00136 Uint32 localFlag ; 00137 #endif 00138 #if defined (DSP_SWI_MODE) 00139 Uint32 priority ; 00140 #endif 00141 } MPCS_ProcObj ; 00142 00169 typedef struct MPCS_ShObj_tag { 00170 volatile MPCS_ProcObj gppMpcsObj ; 00171 ADD_PADDING (gppPadding, MPCSOBJ_PROC_PADDING) 00172 volatile MPCS_ProcObj dspMpcsObj ; 00173 /*Padding required for alignment of MPCS object for L2 cache in 16-bit 00174 words.*/ 00175 ADD_PADDING (dspPadding, MPCSOBJ_PROC_PADDING) 00176 volatile Uint16 turn ; 00177 ADD_PADDING (padding, MPCS_TURN_PADDING) 00178 } MPCS_ShObj ; 00179 00188 typedef MPCS_ShObj MPCS_Obj ; 00189 00196 typedef MPCS_Obj * MPCS_Handle ; 00197 00217 typedef struct MPCS_Entry_tag { 00218 Uint16 ownerProcId ; 00219 Uint16 poolId ; 00220 Ptr physAddress ; 00221 Char name [DSP_MAX_STRLEN] ; 00222 ADD_PADDING (padding, MPCS_ENTRY_PADDING) 00223 } MPCS_Entry ; 00224 00225 00255 typedef struct MPCS_Ctrl_tag { 00256 Uint32 isInitialized ; 00257 Uint32 dspId ; 00258 Uint32 maxEntries ; 00259 Uint32 ipsId ; 00260 Uint32 ipsEventNo ; 00261 MPCS_Entry * dspAddrEntry ; 00262 ADD_PADDING (padding, MPCS_CTRL_PADDING) 00263 MPCS_ShObj lockObj ; 00264 } MPCS_Ctrl ; 00265 00266 00267 #if defined (__cplusplus) 00268 } 00269 #endif /* defined (__cplusplus) */ 00270 00271 00272 #endif /* if !defined (MPCSDEFS_H) */