2 * @file IxNpeDlNpeMgr_p.h
4 * @author Intel Corporation
5 * @date 14 December 2001
6 * @brief This file contains the private API for the NpeMgr module.
10 * IXP400 SW Release version 2.0
12 * -- Copyright Notice --
15 * Copyright 2001-2005, Intel Corporation.
16 * All rights reserved.
19 * SPDX-License-Identifier: BSD-3-Clause
21 * -- End of Copyright Notice --
26 * @defgroup IxNpeDlNpeMgr_p IxNpeDlNpeMgr_p
28 * @brief The private API for the IxNpeDl NpeMgr module
33 #ifndef IXNPEDLNPEMGR_P_H
34 #define IXNPEDLNPEMGR_P_H
38 * Put the user defined include files required.
41 #include "IxOsalTypes.h"
50 * @fn void ixNpeDlNpeMgrInit (void)
52 * @brief Initialises the NpeMgr module
56 * This function initialises the NpeMgr module.
57 * It should be called before any other function in this module is called.
58 * It only needs to be called once, but can be called multiple times safely.
59 * The code will ASSERT on failure.
62 * - It must be called before any other function in this module
65 * - NPE Configuration Register memory space will be mapped using
66 * IxOsal. This memory will not be unmapped by this module.
71 ixNpeDlNpeMgrInit (void);
75 * @fn IX_STATUS ixNpeMhNpeMgrUninit (void)
77 * @brief This function will uninitialise the IxNpeDlNpeMgr sub-component.
79 * This function will uninitialise the IxNpeDlNpeMgr sub-component.
80 * It should only be called once, and only if the IxNpeDlNpeMgr sub-component
81 * has already been initialised by calling @ref ixNpeDlNpeMgrInit().
82 * No other IxNpeDlNpeMgr sub-component API functions should be called
83 * until @ref ixNpeDlNpeMgrInit() is called again.
84 * If possible, this function should be called before a soft reboot or unloading
85 * a kernel module to perform any clean up operations required for IxNpeMh.
88 * - IX_SUCCESS if the operation was successful
92 IX_STATUS ixNpeDlNpeMgrUninit (void);
96 * @fn IX_STATUS ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId,
100 * @brief Loads a image of microcode onto an NPE
102 * @param IxNpeDlNpeId [in] npeId - Id of target NPE
103 * @param UINT32* [in] imageCodePtr - pointer to image code in image to be
105 * @param BOOL [in] verify - if true, verify each word written to
108 * This function loads a image containing blocks of microcode onto a
109 * particular NPE. If the <i>verify</i> option is ON, NpeDl will read back each
110 * word written and verify that it was written successfully
113 * - The NPE should be stopped beforehand
116 * - The NPE Instruction Pipeline may be flushed clean
119 * - IX_SUCCESS if the download was successful
120 * - IX_FAIL if the download failed
121 * - IX_NPEDL_CRITICAL_NPE_ERR if the download failed due to timeout error
122 * where NPE is not responding
125 ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId, UINT32 *imageCodePtr,
130 * @fn IX_STATUS ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId)
132 * @brief sets a NPE to RESET state
134 * @param IxNpeDlNpeId [in] npeId - id of target NPE
136 * This function performs a soft NPE reset by writing reset values to the
137 * Configuration Bus Execution Control registers, the Execution Context Stack
138 * registers, the Physical Register file, and the Context Store registers for
139 * each context number. It also clears inFIFO, outFIFO and Watchpoint FIFO.
140 * It does not reset NPE Co-processors.
143 * - The NPE should be stopped beforehand
146 * - NPE NextProgram Counter (NextPC) will be set to a fixed initial value,
147 * such as 0. This should be explicitly set by downloading State
148 * Information before starting NPE Execution.
149 * - The NPE Instruction Pipeline will be in a clean state.
152 * - IX_SUCCESS if the operation was successful
153 * - IX_FAIL if the operation failed
154 * - IX_NPEDL_CRITICAL_NPE_ERR if the operation failed due to NPE hang
157 ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId);
161 * @fn IX_STATUS ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId)
163 * @brief Starts NPE Execution
165 * @param IxNpeDlNpeId [in] npeId - Id of target NPE
167 * Ensures only background Execution Stack Level is Active, clears instruction
168 * pipeline, and starts Execution on a NPE by sending a Start NPE command to
169 * the NPE. Checks the execution status of the NPE to verify that it is
173 * - The NPE should be stopped beforehand.
174 * - Note that this function does not set the NPE Next Program Counter
175 * (NextPC), so it should be set beforehand if required by downloading
176 * appropriate State Information.
181 * - IX_SUCCESS if the operation was successful
182 * - IX_FAIL otherwise
185 ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId);
189 * @fn IX_STATUS ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId)
191 * @brief Halts NPE Execution
193 * @param IxNpeDlNpeId [in] npeId - id of target NPE
195 * Stops execution on an NPE by sending a Stop NPE command to the NPE.
196 * Checks the execution status of the NPE to verify that it has stopped.
203 * - IX_SUCCESS if the operation was successful
204 * - IX_FAIL otherwise
207 ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId);
211 * @fn void ixNpeDlNpeMgrStatsShow (void)
213 * @brief This function will display statistics of the IxNpeDl NpeMgr module
218 ixNpeDlNpeMgrStatsShow (void);
222 * @fn void ixNpeDlNpeMgrStatsReset (void)
224 * @brief This function will reset the statistics of the IxNpeDl NpeMgr module
229 ixNpeDlNpeMgrStatsReset (void);
232 #endif /* IXNPEDLIMAGEMGR_P_H */
235 * @} defgroup IxNpeDlNpeMgr_p