00001 /** ============================================================================ 00002 * @file mplistdefs.h 00003 * 00004 * @path $(DSPLINK)/gpp/inc/usr/ 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 00043 #if !defined (MPLISTDEFS_H) 00044 #define MPLISTDEFS_H 00045 00046 00047 /* ----------------------------------- DSP/BIOS LINK Headers */ 00048 #include <dsplink.h> 00049 #include <mpcsdefs.h> 00050 00051 00052 #if defined (__cplusplus) 00053 extern "C" { 00054 #endif /* defined (__cplusplus) */ 00055 00056 00057 /** ============================================================================ 00058 * @name MPLIST_Attrs 00059 * 00060 * @brief This structure defines the MPLIST Creation Parameters. 00061 * 00062 * @param poolId 00063 * Pool to be used to allocate memory for MPLIST data structures. 00064 * ============================================================================ 00065 */ 00066 typedef struct MPLIST_Attrs_tag { 00067 PoolId poolId ; 00068 } MPLIST_Attrs ; 00069 00070 /** ============================================================================ 00071 * @name MPLIST_Handle 00072 * 00073 * @brief Handle to the MPLIST object. 00074 * ============================================================================ 00075 */ 00076 typedef void * MPLIST_Handle ; 00077 00078 /** ============================================================================ 00079 * @name MPLIST_Header 00080 * 00081 * @brief An element of a list. 00082 * 00083 * @param next 00084 * Next node pointer. 00085 * @param prev 00086 * Previous node pointer. 00087 * ============================================================================ 00088 */ 00089 typedef struct MPLIST_Header_tag { 00090 struct MPLIST_Header_tag * next ; 00091 struct MPLIST_Header_tag * prev ; 00092 } MPLIST_Header ; 00093 00094 /** ============================================================================ 00095 * @name MPLIST_Elem 00096 * 00097 * @brief This type is used for the handle to the shared list entry structure. 00098 * ============================================================================ 00099 */ 00100 typedef MPLIST_Header * MPLIST_Elem ; 00101 00102 /** ============================================================================ 00103 * @name MPLIST_List 00104 * 00105 * @brief Definition of a MPLIST. 00106 * 00107 * @param head 00108 * Head of the list. 00109 * @param padding 00110 * Padding for alignment. 00111 * @param mpcsObj 00112 * MPCS object used for protection of the list. 00113 * ============================================================================ 00114 */ 00115 typedef struct MPLIST_List_tag { 00116 MPLIST_Header head ; 00117 ADD_PADDING (padding, MPLIST_LIST_PADDING) 00118 MPCS_ShObj mpcsObj ; 00119 } MPLIST_List ; 00120 00121 /** ============================================================================ 00122 * @name MPLIST_Entry 00123 * 00124 * @brief MPLIST descriptor entry for each MPLIST in the system. 00125 * 00126 * @param ownerProcId 00127 * Processor ID of the creator of the MpList. 00128 * @param poolId 00129 * Pool id to be used to allocate memory for all MpList data 00130 * structures. 00131 * @param phyListHandle 00132 * Handle of the MpList in Physical (DSP) address space. 00133 * @param name 00134 * System wide unique identifier for the MpList. 00135 * @param padding 00136 * Padding to make stucture cache aligned. 00137 * ============================================================================ 00138 */ 00139 typedef struct MPLIST_Entry_tag { 00140 Uint16 ownerProcId ; 00141 Uint16 poolId ; 00142 Pvoid phyListHandle ; 00143 Char8 name [DSP_MAX_STRLEN] ; 00144 ADD_PADDING (padding, MPLIST_ENTRY_PADDING) 00145 } MPLIST_Entry ; 00146 00147 /** ============================================================================ 00148 * @name MPLIST_Ctrl 00149 * 00150 * @brief This structure defines the control structure required by the 00151 * MPLIST component. It contains information about all MPLIST objects 00152 * shared between the GPP and a specific DSP. 00153 * 00154 * @param isInitialized 00155 * Flag to indicate if this region was initialized. 00156 * @param dspId 00157 * ID of the DSP with which the MPLIST region is shared. 00158 * @param maxEntries 00159 * Maximum number of MPLIST instances supported by the MPLIST. 00160 * @param ipsId 00161 * ID of the IPS to be used (if any). A value of -1 indicates that 00162 * no IPS is required by the MPLIST. 00163 * @param ipsEventNo 00164 * IPS Event number associated with MPLIST (if any). A value of -1 00165 * indicates that no IPS is required by the MPLIST. 00166 * @param dspAddrEntry 00167 * Pointer to array in DSP address space of MPLIST objects that can 00168 * be created. 00169 * @param padding 00170 * Padding. 00171 * @param lockObj 00172 * Lock used to protect the shared MPLIST control region from 00173 * multiple simultaneous accesses. 00174 * ============================================================================ 00175 */ 00176 typedef struct MPLIST_Ctrl_tag { 00177 Uint32 isInitialized ; 00178 Uint32 dspId ; 00179 Uint32 maxEntries ; 00180 Uint32 ipsId ; 00181 Uint32 ipsEventNo ; 00182 MPLIST_Entry * dspAddrEntry ; 00183 ADD_PADDING (padding, MPLIST_CTRL_PADDING) 00184 MPCS_ShObj lockObj ; 00185 } MPLIST_Ctrl ; 00186 00187 /** ============================================================================ 00188 * @name MPLIST_MemInfo 00189 * 00190 * @brief Entry structure for the MpList data transport 00191 * 00192 * @param physAddr 00193 * Physical address of the memory region for MpList 00194 * @param kernAddr 00195 * Kernel address of the memory region for MpList 00196 * @param userAddr 00197 * User address of the memory region for MpList 00198 * @param size 00199 * Size of the memory region for MpList 00200 * ============================================================================ 00201 */ 00202 typedef struct MPLIST_MemInfo_tag { 00203 ProcessorId procId ; 00204 Uint32 physAddr ; 00205 Uint32 kernAddr ; 00206 Uint32 userAddr ; 00207 Uint32 size ; 00208 } MPLIST_MemInfo ; 00209 00210 00211 #if defined (__cplusplus) 00212 } 00213 #endif /* defined (__cplusplus) */ 00214 00215 #endif /* if !defined (MPLISTDEFS_H) */