[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_1_eng / packages / ti / boot / sbl / src / rprc / sbl_rprc_parse.h
1 /**
2 * \file sbl_rprc_parse.h
3 *
4 * \brief This file contains function prototypes of RPRC image parse functions.
5 *
6 */
8 /*
9 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the
21 * distribution.
22 *
23 * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
41 #ifndef SBL_RPRC_PARSE_H_
42 #define SBL_RPRC_PARSE_H_
44 /* ========================================================================== */
45 /* Include Files */
46 /* ========================================================================== */
47 #include <stdint.h>
48 #include "sbl_image_copy.h"
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif
55 /* ========================================================================== */
56 /* Macros & Typedefs */
57 /* ========================================================================== */
59 #define E_PASS (0)
60 #define E_FAIL (-1)
62 /* Function Pointer used while reading data from the storage. */
63 extern int32_t (*fp_readData)(void *dstAddr, void *srcAddr,
64 uint32_t length);
66 /* Function Pointer used while reading data from the storage. */
67 extern void (*fp_seek)(void *srcAddr, uint32_t location);
69 /* ========================================================================== */
70 /* Function Declarations */
71 /* ========================================================================== */
73 /**
74 * \brief SBL_MulticoreImageParse function parses the multi-core
75 * app image. Read the image header & check for AppImage.
76 * Device ID field confirms the boot device ID. Parses the
77 * meta header & finds the number executables Parses & load
78 * each section into CPU internal memory & external memory
79 *
80 * \param srcAddr Start address of AppImage ImageOffset - Dummy
81 *
82 * \retval error status.If error has occured it returns a non zero value.
83 * If no error has occured then return status will be zero.
84 */
85 int32_t SBL_MulticoreImageParse(void *srcAddr,
86 uint32_t ImageOffset,
87 sblEntryPoint_t *pEntry);
89 #ifdef __cplusplus
90 }
91 #endif
93 #endif /*SBL_RPRC_PARSE_H_*/