1 /**
2 * @file _ProcMgr.h
3 *
4 * @brief Processor Manager
5 *
6 * Defines internal functions to be called by system integrators.
7 *
8 *
9 */
10 /*
11 * ============================================================================
12 *
13 * Copyright (c) 2008-2015, Texas Instruments Incorporated
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 *
19 * * Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 *
22 * * Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * * Neither the name of Texas Instruments Incorporated nor the names of
27 * its contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
32 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
37 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 * Contact information for paper mail:
42 * Texas Instruments
43 * Post Office Box 655303
44 * Dallas, Texas 75265
45 * Contact information:
46 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
47 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
48 * ============================================================================
49 *
50 */
54 #ifndef _ProcMgr_H_0xf2ba
55 #define _ProcMgr_H_0xf2ba
58 /* Module headers */
59 #include <ti/syslink/SysLink.h>
60 #include <ti/syslink/ProcMgr.h>
63 #if defined (__cplusplus)
64 extern "C" {
65 #endif
68 /* =============================================================================
69 * Macros and types
70 * =============================================================================
71 */
72 /*!
73 * @def ProcMgr_MODULEID
74 * @brief Module ID for ProcMgr.
75 */
76 #define ProcMgr_MODULEID (UInt16) 0xf2ba
78 /*!
79 * @brief Maximum name length for ProcMgr module strings.
80 */
81 #define ProcMgr_MAX_STRLEN 32u
84 /*!
85 * @brief Module configuration structure.
86 */
87 typedef struct ProcMgr_Config {
88 Ipc_MemoryMap * sysMemMap;
89 /*!< Ipc memory map. */
90 } ProcMgr_Config;
92 /*!
93 * @brief Configuration parameters specific to the slave ProcMgr instance.
94 */
95 typedef struct ProcMgr_Params_tag {
96 Ptr procHandle;
97 /*!< Handle to the Processor object associated with this ProcMgr. */
98 Ptr loaderHandle;
99 /*!< Handle to the Loader object associated with this ProcMgr. */
100 Ptr pwrHandle;
101 /*!< Handle to the PwrMgr object associated with this ProcMgr. */
102 Char rstVectorSectionName [ProcMgr_MAX_STRLEN];
103 /*!< Reset vector section name */
104 } ProcMgr_Params ;
107 /* =============================================================================
108 * APIs
109 * =============================================================================
110 */
112 /* Function to get the default configuration for the ProcMgr module. */
113 Void ProcMgr_getConfig (ProcMgr_Config * cfg);
115 /* Function to setup the ProcMgr module. */
116 Int ProcMgr_setup (ProcMgr_Config * cfg);
118 /* Function to destroy the ProcMgr module. */
119 Int ProcMgr_destroy (Void);
121 /* Function to initialize the parameters for the ProcMgr instance. */
122 Void ProcMgr_Params_init (ProcMgr_Handle handle, ProcMgr_Params * params);
124 /* Function to create a ProcMgr object for a specific slave processor. */
125 ProcMgr_Handle ProcMgr_create (UInt16 procId, const ProcMgr_Params * params);
127 /* Function to delete a ProcMgr object for a specific slave processor. */
128 Int ProcMgr_delete (ProcMgr_Handle * handlePtr);
130 /* Function to translate between two types of address spaces. (does not take
131 * lock internally) */
132 Int _ProcMgr_translateAddr (ProcMgr_Handle handle,
133 Ptr * dstAddr,
134 ProcMgr_AddrType dstAddrType,
135 Ptr srcAddr,
136 ProcMgr_AddrType srcAddrType);
138 /* Function that maps the specified slave address to master address space.
139 * (does not take lock internally) */
140 Int _ProcMgr_map (ProcMgr_Handle handle,
141 ProcMgr_MapMask mapMask,
142 ProcMgr_AddrInfo * addrInfo,
143 ProcMgr_AddrType srcAddrType);
145 /* Function that unmaps the specified slave address from master address space.
146 * (does not take lock internally) */
147 Int _ProcMgr_unmap (ProcMgr_Handle handle,
148 ProcMgr_MapMask mapMask,
149 ProcMgr_AddrInfo * addrInfo,
150 ProcMgr_AddrType srcAddrType);
152 /* Function to copy system memory map */
153 Void _ProcMgr_configSysMap (ProcMgr_Config * cfg);
155 /* Function to copy instance params overrides */
156 Void _ProcMgr_saveParams (String params, Int len);
159 #if defined (__cplusplus)
160 }
161 #endif /* defined (__cplusplus) */
163 #endif /* _ProcMgr_H_0xf2ba */