00001 /** ============================================================================ 00002 * @file mplistdefs.h 00003 * 00004 * @path $(DSPLINK)/dsp/inc/ 00005 * 00006 * @brief Global definitions for MPLIST module 00007 * 00008 * @ver 1.65.00.03 00009 * ============================================================================ 00010 * @copyright Copyright (C) 2002-2009, Texas Instruments Incorporated - 00011 * http://www.ti.com/ 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 00017 * * Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * 00020 * * Redistributions in binary form must reproduce the above copyright 00021 * notice, this list of conditions and the following disclaimer in the 00022 * documentation and/or other materials provided with the distribution. 00023 * 00024 * * Neither the name of Texas Instruments Incorporated nor the names of 00025 * its contributors may be used to endorse or promote products derived 00026 * from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00029 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00035 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00036 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00037 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00038 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * ============================================================================ 00040 */ 00041 00042 #if !defined (MPLISTDEFS_H) 00043 #define MPLISTDEFS_H 00044 00045 00046 /* ----------------------------------- DSP/BIOS LINK Headers */ 00047 #include <mpcs.h> 00048 00049 00050 #if defined (__cplusplus) 00051 extern "C" { 00052 #endif /* defined (__cplusplus) */ 00053 00054 00055 /** ============================================================================ 00056 * @name MPLIST_Attrs 00057 * 00058 * @brief This structure defines the MPLIST Creation Parameters. 00059 * 00060 * @param poolId 00061 * Pool to be used to allocate memory for MPLIST data structures. 00062 * All MPLIST elements will be allocated using this pool. 00063 * ============================================================================ 00064 */ 00065 typedef struct MPLIST_Attrs_tag { 00066 Uint16 poolId ; 00067 } MPLIST_Attrs ; 00068 00069 /** ============================================================================ 00070 * @name MPLIST_Obj 00071 * 00072 * @brief Multiprocessor List object, which is used for getting a handle to 00073 * the list section between multiple processors. This object is not 00074 * shared between the processors, and the object instance is specific 00075 * to the process opening the handle. 00076 * 00077 * @param phyListHandle 00078 * Physical space address of the MPLIST. 00079 * @param phyListHandle 00080 * Physical space address of the MPCS used for protecting the list. 00081 * @param phyEntryHandle 00082 * Physical space address of the MPLIST entry in the shared region. 00083 * ============================================================================ 00084 */ 00085 typedef struct MPLIST_Obj_tag { 00086 Ptr phyListHandle ; 00087 Ptr phyLockHandle ; 00088 Ptr phyEntryHandle ; 00089 } MPLIST_Obj ; 00090 00091 /** ============================================================================ 00092 * @name MPLIST_Handle 00093 * 00094 * @brief Handle to the MPLIST object. 00095 * ============================================================================ 00096 */ 00097 typedef MPLIST_Obj * MPLIST_Handle ; 00098 00099 00100 /** ============================================================================ 00101 * @name MPLIST_Header 00102 * 00103 * @brief An element of a list. 00104 * 00105 * @param next 00106 * Next node pointer. 00107 * @param prev 00108 * Previous node pointer. 00109 * ============================================================================ 00110 */ 00111 typedef struct MPLIST_Header_tag { 00112 struct MPLIST_Header_tag * next ; 00113 struct MPLIST_Header_tag * prev ; 00114 } MPLIST_Header ; 00115 00116 /** ============================================================================ 00117 * @name MPLIST_Elem 00118 * 00119 * @brief This type is used for the handle to the shared list entry structure. 00120 * 00121 * @modif None 00122 * ============================================================================ 00123 */ 00124 typedef MPLIST_Header * MPLIST_Elem ; 00125 00126 /** ============================================================================ 00127 * @name MPLIST_List 00128 * 00129 * @brief Definition of a MPLIST. 00130 * 00131 * @param head 00132 * Head of the list. 00133 * @param padding 00134 * padding to make the structure cache aligned. 00135 * @param mpcsObj 00136 * List specific MPCS object. 00137 * ============================================================================ 00138 */ 00139 typedef struct MPLIST_List_tag { 00140 MPLIST_Header head ; 00141 ADD_PADDING (padding, MPLIST_LIST_PADDING) 00142 MPCS_ShObj mpcsObj ; 00143 } MPLIST_List ; 00144 00145 /** ============================================================================ 00146 * @name MPLIST_Entry 00147 * 00148 * @brief Entry structure for the MPLIST data transport 00149 * 00150 * @param ownerProcId 00151 * Processor ID of this MPLIST's Creator. 00152 * @param poolId 00153 * Pool to be used to allocate memory for all MPLIST data 00154 * structures. 00155 * @param phyListHandle 00156 * Physical (DSP) address of the MPLIST. 00157 * @param name 00158 * System wide unique identifier for the MPLIST 00159 * @param padding 00160 * Padding to make stucture cache aligned 00161 * ============================================================================ 00162 */ 00163 typedef struct MPLIST_Entry_tag { 00164 Uint16 ownerProcId ; 00165 Uint16 poolId ; 00166 Ptr phyListHandle ; 00167 Char name [DSP_MAX_STRLEN] ; 00168 ADD_PADDING (padding, MPLIST_ENTRY_PADDING) 00169 } MPLIST_Entry ; 00170 00171 /** ============================================================================ 00172 * @name MPLIST_Ctrl 00173 * 00174 * @brief This structure defines the control structure required by the 00175 * MPLIST component. It contains information about all MPLIST objects 00176 * shared between the GPP and a specific DSP. 00177 * 00178 * @param isInitialized 00179 * Flag to indicate if this region was initialized 00180 * @param dspId 00181 * ID of the DSP with which the MPLIST region is shared. 00182 * @param maxEntries 00183 * Maximum number of MPLIST instances supported by the MPLIST. 00184 * @param ipsId 00185 * ID of the IPS to be used (if any). A value of -1 indicates that 00186 * no IPS is required by the MPLIST. 00187 * @param ipsEventNo 00188 * IPS Event number associated with MPLIST (if any). A value of -1 00189 * indicates that no IPS is required by the MPLIST. 00190 * @param dspAddrEntry 00191 * Pointer to array in DSP address space of MPLIST objects that can 00192 * be created. 00193 * @param padding 00194 * Padding. 00195 * @param lockObj 00196 * Lock used to protect the shared MPLIST control region from 00197 * multiple simultaneous accesses. 00198 * ============================================================================ 00199 */ 00200 typedef struct MPLIST_Ctrl_tag { 00201 Uint32 isInitialized ; 00202 Uint32 dspId ; 00203 Uint32 maxEntries ; 00204 Uint32 ipsId ; 00205 Uint32 ipsEventNo ; 00206 MPLIST_Entry * dspAddrEntry ; 00207 ADD_PADDING (padding, MPLIST_CTRL_PADDING) 00208 MPCS_ShObj lockObj ; 00209 } MPLIST_Ctrl ; 00210 00211 00212 #if defined (__cplusplus) 00213 } 00214 #endif /* defined (__cplusplus) */ 00215 00216 #endif /* if !defined (MPLISTDEFS_H) */