00001 /** ============================================================================ 00002 * @file loaderdefs.h 00003 * 00004 * @path $(DSPLINK)/gpp/inc/usr/ 00005 * 00006 * @brief Defines data types and structures used by the DSP/BIOS(tm) Link 00007 * loader. 00008 * 00009 * @ver 1.65.00.03 00010 * ============================================================================ 00011 * @copyright Copyright (C) 2002-2009, Texas Instruments Incorporated - 00012 * http://www.ti.com/ 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions 00016 * are met: 00017 * 00018 * * Redistributions of source code must retain the above copyright 00019 * notice, this list of conditions and the following disclaimer. 00020 * 00021 * * Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in the 00023 * documentation and/or other materials provided with the distribution. 00024 * 00025 * * Neither the name of Texas Instruments Incorporated nor the names of 00026 * its contributors may be used to endorse or promote products derived 00027 * from this software without specific prior written permission. 00028 * 00029 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00030 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00031 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00032 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00033 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00034 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00035 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00036 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00037 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00038 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00039 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00040 * ============================================================================ 00041 */ 00042 00043 00044 #if !defined (LOADERDEFS_H) 00045 #define LOADERDEFS_H 00046 00047 00048 /* ----------------------------------- DSP/BIOS Link */ 00049 #include <dsplink.h> 00050 #include <procdefs.h> 00051 00052 00053 #if defined (__cplusplus) 00054 extern "C" { 00055 #endif 00056 00057 00058 /** ============================================================================ 00059 * @name BINLOADER_ImageInfo 00060 * 00061 * @brief Structure defining information about the image to be loaded. A 00062 * pointer to this structure is passed during the PROC_load () function 00063 * as the imagePath, when the binary loader is used. 00064 * 00065 * @param gppAddr 00066 * Address of the file to be loaded, in GPP address space. 00067 * @param dspLoadAddr 00068 * DSP address where the binary file is to be loaded. 00069 * @param dspRunAddr 00070 * DSP address from where the binary file execution is to be 00071 * started. 00072 * @param fileSize 00073 * Size of the file to be loaded in bytes. 00074 * @param shmBaseAddr 00075 * Address of the symbol where the DSPLINK shared memory base 00076 * address is stored. 00077 * 00078 * @see PROC_load () 00079 * ============================================================================ 00080 */ 00081 typedef struct BINLOADER_ImageInfo_tag { 00082 Uint32 gppAddr ; 00083 Uint32 dspLoadAddr ; 00084 Uint32 dspRunAddr ; 00085 Uint32 fileSize ; 00086 Uint32 shmBaseAddr ; 00087 } BINLOADER_ImageInfo ; 00088 00089 00090 /** ============================================================================ 00091 * @name STATICLOADER_ImageInfo 00092 * 00093 * @brief Structure defining information about the image to be loaded. A 00094 * pointer to this structure is passed during the PROC_load () function 00095 * as the imagePath, when the static loader is used. 00096 * 00097 * @param dspRunAddr 00098 * DSP address from where the binary file execution is to be 00099 * started. 00100 * @param argsAddr 00101 * Address of the .args section. 00102 * @param argsSize 00103 * Size of the .args section. 00104 * @param shmBaseAddr 00105 * Address of the symbol where the DSPLINK shared memory base 00106 * address is stored. 00107 * 00108 * @see PROC_load () 00109 * ============================================================================ 00110 */ 00111 typedef struct STATICLOADER_ImageInfo_tag { 00112 Uint32 dspRunAddr ; 00113 Uint32 argsAddr ; 00114 Uint32 argsSize ; 00115 Uint32 shmBaseAddr ; 00116 } STATICLOADER_ImageInfo ; 00117 00118 00119 /** ============================================================================ 00120 * @name NOLOADER_ImageInfo 00121 * 00122 * @brief Structure defining information about the image to be loaded. A 00123 * pointer to this structure is passed during the PROC_load () function 00124 * as the imagePath, when the dummy loader is used. 00125 * 00126 * @param dspRunAddr 00127 * DSP address from where the binary file execution is to be 00128 * started. 00129 * @param argsAddr 00130 * Address of the .args section. 00131 * @param argsSize 00132 * Size of the .args section. 00133 * @param shmBaseAddr 00134 * Address of the symbol where the DSPLINK shared memory base 00135 * address is stored. 00136 * 00137 * @see PROC_load () 00138 * ============================================================================ 00139 */ 00140 typedef struct NOLOADER_ImageInfo_tag { 00141 Uint32 dspRunAddr ; 00142 Uint32 argsAddr ; 00143 Uint32 argsSize ; 00144 Uint32 shmBaseAddr ; 00145 } NOLOADER_ImageInfo ; 00146 00147 00148 /** ============================================================================ 00149 * @name COFFLOADER_ImageInfo 00150 * 00151 * @brief Structure defining information about the image to be loaded. A 00152 * pointer to this structure is passed during the PROC_load () function 00153 * as the imagePath, when the COFF loader to be read from memory is 00154 * used. 00155 * 00156 * @param fileAddr 00157 * GPP kernel address from where the COFF file is to be read. 00158 * @param size 00159 * Size of .out file. 00160 * 00161 * @see PROC_load () 00162 * ============================================================================ 00163 */ 00164 typedef struct COFFLOADER_ImageInfo_tag { 00165 Uint32 fileAddr ; 00166 Uint32 size ; 00167 } COFFLOADER_ImageInfo ; 00168 00169 00170 /** ============================================================================ 00171 * @deprecated The deprecated data structure BinLoaderImageInfo has been 00172 * replaced with BINLOADER_ImageInfo. 00173 * 00174 * ============================================================================ 00175 */ 00176 #define BinLoaderImageInfo BINLOADER_ImageInfo 00177 00178 00179 #if defined (__cplusplus) 00180 } 00181 #endif 00182 00183 #endif /* !define (LOADERDEFS_H) */