00001 /** ============================================================================ 00002 * @file procdefs.h 00003 * 00004 * @path $(DSPLINK)/gpp/inc/usr/ 00005 * 00006 * @brief Defines data types and structures used by PROC component. 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 (PROCDEFS_H) 00044 #define PROCDEFS_H 00045 00046 00047 /* ----------------------------------- DSP/BIOS Link */ 00048 #include <gpptypes.h> 00049 #include <linkcfgdefs.h> 00050 00051 00052 #if defined (__cplusplus) 00053 extern "C" { 00054 #endif 00055 00056 00057 /** ============================================================================ 00058 * @macro IS_VALID_PROCID 00059 * 00060 * @brief Is the proc ID valid. 00061 * ============================================================================ 00062 */ 00063 #define IS_VALID_PROCID(id) (id < MAX_DSPS) 00064 00065 00066 /** ============================================================================ 00067 * @name PROC_State 00068 * 00069 * @brief Enumerations to indicate processor states. 00070 * 00071 * @param ProcState_Unknown 00072 * Unknown (possibly error) processor state. 00073 * @param ProcState_Setup 00074 * Indicates that the PROC component has been setup. 00075 * @param ProcState_Loaded 00076 * Indicates the DSP is loaded. 00077 * @param ProcState_Started 00078 * Indicates the DSP is started. 00079 * @param ProcState_Stopped 00080 * Indicates the DSP is stopped. 00081 * @param ProcState_Idle 00082 * Indicates the DSP is idle. 00083 * @param ProcState_Reset 00084 * Indicates the DSP is reset. 00085 * @param ProcState_Unavailable 00086 * Indicates the DSP is unavailable to the physical transport. 00087 * ============================================================================ 00088 */ 00089 typedef enum { 00090 ProcState_Unknown = 0u, 00091 ProcState_Setup = 1u, 00092 ProcState_Loaded = 2u, 00093 ProcState_Started = 3u, 00094 ProcState_Stopped = 4u, 00095 ProcState_Idle = 5u, 00096 ProcState_Reset = 6u, 00097 ProcState_Unavailable = 7u 00098 } PROC_State ; 00099 00100 00101 /** ============================================================================ 00102 * @name PROC_Attrs 00103 * 00104 * @brief A placeholder for processor information. 00105 * 00106 * @param timeout 00107 * Time out associated with a DSP. 00108 * @param dspCfgPtr 00109 * Pointer to DSP side Configuration. 00110 * ============================================================================ 00111 */ 00112 typedef struct PROC_Attrs_tag { 00113 Uint32 timeout ; 00114 LINKCFG_DspConfig * dspCfgPtr ; 00115 } PROC_Attrs ; 00116 00117 00118 /* ============================================================================ 00119 * @const PROC_CTRL_CMD_GEN_BASE, PROC_CTRL_CMD_GEN_END 00120 * 00121 * @brief Range for PROC_Control () commands to be handled by the generic 00122 * implementation of PROC component. 00123 * ============================================================================ 00124 */ 00125 #define PROC_CTRL_CMD_GEN_BASE 0x00000100u 00126 #define PROC_CTRL_CMD_GEN_LAST 0x00000200u 00127 00128 /* ============================================================================ 00129 * @const PROC_CTRL_CMD_MAP_DSPMEM, PROC_CTRL_CMD_UNMAP_DSPMEM 00130 * PROC_CTRL_CMD_MMU_ADD_ENTRY, PROC_CTRL_CMD_MMU_DEL_ENTRY 00131 * 00132 * @brief Commands for mapping/ unmapping DSP memory. 00133 * Commands for add/ delete mmu entry. 00134 * ============================================================================ 00135 */ 00136 #define PROC_CTRL_CMD_MAP_DSPMEM (PROC_CTRL_CMD_GEN_BASE + 0x00000001u) 00137 #define PROC_CTRL_CMD_UNMAP_DSPMEM (PROC_CTRL_CMD_GEN_BASE + 0x00000002u) 00138 #define PROC_CTRL_CMD_MMU_ADD_ENTRY (PROC_CTRL_CMD_GEN_BASE + 0x00000003u) 00139 #define PROC_CTRL_CMD_MMU_DEL_ENTRY (PROC_CTRL_CMD_GEN_BASE + 0x00000004u) 00140 00141 /** ============================================================================ 00142 * @name ProcMemMapInfo 00143 * 00144 * @brief Control information for mapping DSP memory region in GPP's address 00145 * space. 00146 * 00147 * @param dspAddr 00148 * Address in the DSP memory space to be mapped 00149 * @param size 00150 * Size of memory to be mapped 00151 * @param mappedAddr 00152 * Mapped address in the user memory space 00153 * @param mappedSize 00154 * Size of memory actually mapped 00155 * ============================================================================ 00156 */ 00157 typedef struct ProcMemMapInfo_tag { 00158 Uint32 dspAddr ; 00159 Uint32 size ; 00160 Uint32 mappedAddr ; 00161 Uint32 mappedSize ; 00162 } ProcMemMapInfo ; 00163 00164 00165 /** ============================================================================ 00166 * @deprecated The deprecated data structure ProcState has been replaced 00167 * with PROC_State. 00168 * This has been done to follow DSP/BIOS codinf guidelines and 00169 * have a uniform naming convention for the API's on both GPP 00170 * as well as DSP. 00171 * 00172 * ============================================================================ 00173 */ 00174 #define ProcState PROC_State 00175 00176 /** ============================================================================ 00177 * @deprecated The deprecated data structures ProcAttr has been replaced 00178 * with PROC_Attrs. 00179 * This has been done to follow DSP/BIOS codinf guidelines and 00180 * have a uniform naming convention for the API's on both GPP 00181 * as well as DSP. 00182 * 00183 * ============================================================================ 00184 */ 00185 #define ProcAttr PROC_Attrs 00186 00187 00188 #if defined (__cplusplus) 00189 } 00190 #endif 00191 00192 00193 #endif /* !defined (PROCDEFS_H) */