source: SVN/cambria/redboot/packages/devs/eth/intel/npe/npeDl/current/include/IxNpeDlNpeMgr_p.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 7.5 KB
Line 
1/**
2 * @file IxNpeDlNpeMgr_p.h
3 *
4 * @author Intel Corporation
5 * @date 14 December 2001
6 * @brief This file contains the private API for the NpeMgr module.
7 *
8 *
9 * @par
10 * IXP400 SW Release version 2.3
11 *
12 * -- Copyright Notice --
13 *
14 * @par
15 * Copyright (c) 2001-2005, Intel Corporation.
16 * All rights reserved.
17 *
18 * @par
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 *    notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 *    notice, this list of conditions and the following disclaimer in the
26 *    documentation and/or other materials provided with the distribution.
27 * 3. Neither the name of the Intel Corporation nor the names of its contributors
28 *    may be used to endorse or promote products derived from this software
29 *    without specific prior written permission.
30 *
31 *
32 * @par
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
34 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 *
46 * @par
47 * -- End of Copyright Notice --
48*/
49
50
51/**
52 * @defgroup IxNpeDlNpeMgr_p IxNpeDlNpeMgr_p
53 *
54 * @brief The private API for the IxNpeDl NpeMgr module
55 *
56 * @{
57 */
58
59#ifndef IXNPEDLNPEMGR_P_H
60#define IXNPEDLNPEMGR_P_H
61
62
63/*
64 * Put the user defined include files required.
65 */
66#include "IxNpeDl.h"
67#include "IxOsalTypes.h"
68
69
70/*
71 * Function Prototypes
72 */
73
74
75/**
76 * @fn void ixNpeDlNpeMgrInit (void)
77 *
78 * @brief Initialises the NpeMgr module
79 *
80 * @param none
81 *
82 * This function initialises the NpeMgr module.
83 * It should be called before any other function in this module is called.
84 * It only needs to be called once, but can be called multiple times safely.
85 * The code will ASSERT on failure.
86 *
87 * @pre
88 *     - It must be called before any other function in this module
89 *
90 * @post
91 *     - NPE Configuration Register memory space will be mapped using
92 *       IxOsal. This memory will not be unmapped by this module.
93 *
94 * @return none
95 */ 
96void
97ixNpeDlNpeMgrInit (void);
98
99
100/**
101 * @fn IX_STATUS ixNpeMhNpeMgrUninit (void)
102 *
103 * @brief This function will uninitialise the IxNpeDlNpeMgr sub-component.
104 *
105 * This function will uninitialise the IxNpeDlNpeMgr sub-component.
106 * It should only be called once, and only if the IxNpeDlNpeMgr sub-component
107 * has already been initialised by calling @ref ixNpeDlNpeMgrInit().
108 * No other IxNpeDlNpeMgr sub-component API functions should be called
109 * until @ref ixNpeDlNpeMgrInit() is called again.
110 * If possible, this function should be called before a soft reboot or unloading
111 * a kernel module to perform any clean up operations required for IxNpeMh.
112 *
113 * @return
114 *      - IX_SUCCESS if the operation was successful
115 *      - IX_FAIL otherwise
116 */
117
118IX_STATUS ixNpeDlNpeMgrUninit (void);
119
120
121/**
122 * @fn IX_STATUS ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId,
123                                           UINT32 *imageCodePtr,
124                                           BOOL verify)
125 *
126 * @brief Loads a image of microcode onto an NPE
127 *
128 * @param IxNpeDlNpeId [in] npeId     - Id of target NPE
129 * @param UINT32* [in] imageCodePtr - pointer to image code in image to be
130 *                                      downloaded
131 * @param BOOL [in] verify            - if TRUE, verify each word written to
132 *                                      NPE memory.
133 *
134 * This function loads a image containing blocks of microcode onto a
135 * particular NPE. If the <i>verify</i> option is ON, NpeDl will read back each
136 * word written and verify that it was written successfully
137 *
138 * @pre
139 *     - The NPE should be stopped beforehand
140 *
141 * @post
142 *     - The NPE Instruction Pipeline may be flushed clean
143 *
144 * @return
145 *     - IX_SUCCESS if the download was successful
146 *     - IX_FAIL if the download failed
147 *     - IX_NPEDL_CRITICAL_NPE_ERR if the download failed due to timeout error
148 *       where NPE is not responding
149 */ 
150IX_STATUS
151ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId, UINT32 *imageCodePtr,
152                          BOOL verify);
153
154
155/**
156 * @fn IX_STATUS ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId)
157 *
158 * @brief sets a NPE to RESET state
159 *
160 * @param IxNpeDlNpeId [in] npeId - id of target NPE
161 *
162 * This function performs a soft NPE reset by writing reset values to the
163 * Configuration Bus Execution Control registers, the Execution Context Stack
164 * registers, the Physical Register file, and the Context Store registers for
165 * each context number. It also clears inFIFO, outFIFO and Watchpoint FIFO.
166 * It does not reset NPE Co-processors.
167 *
168 * @pre
169 *     - The NPE should be stopped beforehand
170 *
171 * @post
172 *     - NPE NextProgram Counter (NextPC) will be set to a fixed initial value,
173 *       such as 0.  This should be explicitly set by downloading State
174 *       Information before starting NPE Execution.
175 *     - The NPE Instruction Pipeline will be in a clean state.
176 *
177 * @return
178 *     - IX_SUCCESS if the operation was successful
179 *     - IX_FAIL if the operation failed
180 *     - IX_NPEDL_CRITICAL_NPE_ERR if the operation failed due to NPE hang
181 */ 
182IX_STATUS
183ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId);
184
185
186/**
187 * @fn IX_STATUS ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId)
188 *
189 * @brief Starts NPE Execution
190 *
191 * @param IxNpeDlNpeId [in] npeId - Id of target NPE
192 *
193 * Ensures only background Execution Stack Level is Active, clears instruction
194 * pipeline, and starts Execution on a NPE by sending a Start NPE command to
195 * the NPE. Checks the execution status of the NPE to verify that it is
196 * running.
197 *
198 * @pre
199 *     - The NPE should be stopped beforehand.
200 *     - Note that this function does not set the NPE Next Program Counter
201 *       (NextPC), so it should be set beforehand if required by downloading
202 *       appropriate State Information.
203 *
204 * @post
205 *
206 * @return
207 *     - IX_SUCCESS if the operation was successful
208 *     - IX_FAIL otherwise
209 */ 
210IX_STATUS
211ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId);
212
213
214/**
215 * @fn IX_STATUS ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId)
216 *
217 * @brief Halts NPE Execution
218 *
219 * @param IxNpeDlNpeId [in] npeId - id of target NPE
220 *
221 * Stops execution on an NPE by sending a Stop NPE command to the NPE.
222 * Checks the execution status of the NPE to verify that it has stopped.
223 *
224 * @pre
225 *
226 * @post
227 *
228 * @return
229 *     - IX_SUCCESS if the operation was successful
230 *     - IX_FAIL otherwise
231 */ 
232IX_STATUS
233ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId);
234
235
236/**
237 * @fn void ixNpeDlNpeMgrStatsShow (void)
238 *
239 * @brief This function will display statistics of the IxNpeDl NpeMgr module
240 *
241 * @return none
242 */
243void
244ixNpeDlNpeMgrStatsShow (void);
245
246
247/**
248 * @fn void ixNpeDlNpeMgrStatsReset (void)
249 *
250 * @brief This function will reset the statistics of the IxNpeDl NpeMgr module
251 *
252 * @return none
253 */
254void
255ixNpeDlNpeMgrStatsReset (void);
256
257
258#endif /* IXNPEDLIMAGEMGR_P_H */
259
260/**
261 * @} defgroup IxNpeDlNpeMgr_p
262 */
Note: See TracBrowser for help on using the repository browser.