IxNpeDlNpeMgr_p.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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.0
  11. *
  12. * -- Copyright Notice --
  13. *
  14. * @par
  15. * Copyright 2001-2005, Intel Corporation.
  16. * All rights reserved.
  17. *
  18. * @par
  19. * SPDX-License-Identifier: BSD-3-Clause
  20. * @par
  21. * -- End of Copyright Notice --
  22. */
  23. /**
  24. * @defgroup IxNpeDlNpeMgr_p IxNpeDlNpeMgr_p
  25. *
  26. * @brief The private API for the IxNpeDl NpeMgr module
  27. *
  28. * @{
  29. */
  30. #ifndef IXNPEDLNPEMGR_P_H
  31. #define IXNPEDLNPEMGR_P_H
  32. /*
  33. * Put the user defined include files required.
  34. */
  35. #include "IxNpeDl.h"
  36. #include "IxOsalTypes.h"
  37. /*
  38. * Function Prototypes
  39. */
  40. /**
  41. * @fn void ixNpeDlNpeMgrInit (void)
  42. *
  43. * @brief Initialises the NpeMgr module
  44. *
  45. * @param none
  46. *
  47. * This function initialises the NpeMgr module.
  48. * It should be called before any other function in this module is called.
  49. * It only needs to be called once, but can be called multiple times safely.
  50. * The code will ASSERT on failure.
  51. *
  52. * @pre
  53. * - It must be called before any other function in this module
  54. *
  55. * @post
  56. * - NPE Configuration Register memory space will be mapped using
  57. * IxOsal. This memory will not be unmapped by this module.
  58. *
  59. * @return none
  60. */
  61. void
  62. ixNpeDlNpeMgrInit (void);
  63. /**
  64. * @fn IX_STATUS ixNpeMhNpeMgrUninit (void)
  65. *
  66. * @brief This function will uninitialise the IxNpeDlNpeMgr sub-component.
  67. *
  68. * This function will uninitialise the IxNpeDlNpeMgr sub-component.
  69. * It should only be called once, and only if the IxNpeDlNpeMgr sub-component
  70. * has already been initialised by calling @ref ixNpeDlNpeMgrInit().
  71. * No other IxNpeDlNpeMgr sub-component API functions should be called
  72. * until @ref ixNpeDlNpeMgrInit() is called again.
  73. * If possible, this function should be called before a soft reboot or unloading
  74. * a kernel module to perform any clean up operations required for IxNpeMh.
  75. *
  76. * @return
  77. * - IX_SUCCESS if the operation was successful
  78. * - IX_FAIL otherwise
  79. */
  80. IX_STATUS ixNpeDlNpeMgrUninit (void);
  81. /**
  82. * @fn IX_STATUS ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId,
  83. UINT32 *imageCodePtr,
  84. BOOL verify)
  85. *
  86. * @brief Loads a image of microcode onto an NPE
  87. *
  88. * @param IxNpeDlNpeId [in] npeId - Id of target NPE
  89. * @param UINT32* [in] imageCodePtr - pointer to image code in image to be
  90. * downloaded
  91. * @param BOOL [in] verify - if true, verify each word written to
  92. * NPE memory.
  93. *
  94. * This function loads a image containing blocks of microcode onto a
  95. * particular NPE. If the <i>verify</i> option is ON, NpeDl will read back each
  96. * word written and verify that it was written successfully
  97. *
  98. * @pre
  99. * - The NPE should be stopped beforehand
  100. *
  101. * @post
  102. * - The NPE Instruction Pipeline may be flushed clean
  103. *
  104. * @return
  105. * - IX_SUCCESS if the download was successful
  106. * - IX_FAIL if the download failed
  107. * - IX_NPEDL_CRITICAL_NPE_ERR if the download failed due to timeout error
  108. * where NPE is not responding
  109. */
  110. IX_STATUS
  111. ixNpeDlNpeMgrImageLoad (IxNpeDlNpeId npeId, UINT32 *imageCodePtr,
  112. BOOL verify);
  113. /**
  114. * @fn IX_STATUS ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId)
  115. *
  116. * @brief sets a NPE to RESET state
  117. *
  118. * @param IxNpeDlNpeId [in] npeId - id of target NPE
  119. *
  120. * This function performs a soft NPE reset by writing reset values to the
  121. * Configuration Bus Execution Control registers, the Execution Context Stack
  122. * registers, the Physical Register file, and the Context Store registers for
  123. * each context number. It also clears inFIFO, outFIFO and Watchpoint FIFO.
  124. * It does not reset NPE Co-processors.
  125. *
  126. * @pre
  127. * - The NPE should be stopped beforehand
  128. *
  129. * @post
  130. * - NPE NextProgram Counter (NextPC) will be set to a fixed initial value,
  131. * such as 0. This should be explicitly set by downloading State
  132. * Information before starting NPE Execution.
  133. * - The NPE Instruction Pipeline will be in a clean state.
  134. *
  135. * @return
  136. * - IX_SUCCESS if the operation was successful
  137. * - IX_FAIL if the operation failed
  138. * - IX_NPEDL_CRITICAL_NPE_ERR if the operation failed due to NPE hang
  139. */
  140. IX_STATUS
  141. ixNpeDlNpeMgrNpeReset (IxNpeDlNpeId npeId);
  142. /**
  143. * @fn IX_STATUS ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId)
  144. *
  145. * @brief Starts NPE Execution
  146. *
  147. * @param IxNpeDlNpeId [in] npeId - Id of target NPE
  148. *
  149. * Ensures only background Execution Stack Level is Active, clears instruction
  150. * pipeline, and starts Execution on a NPE by sending a Start NPE command to
  151. * the NPE. Checks the execution status of the NPE to verify that it is
  152. * running.
  153. *
  154. * @pre
  155. * - The NPE should be stopped beforehand.
  156. * - Note that this function does not set the NPE Next Program Counter
  157. * (NextPC), so it should be set beforehand if required by downloading
  158. * appropriate State Information.
  159. *
  160. * @post
  161. *
  162. * @return
  163. * - IX_SUCCESS if the operation was successful
  164. * - IX_FAIL otherwise
  165. */
  166. IX_STATUS
  167. ixNpeDlNpeMgrNpeStart (IxNpeDlNpeId npeId);
  168. /**
  169. * @fn IX_STATUS ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId)
  170. *
  171. * @brief Halts NPE Execution
  172. *
  173. * @param IxNpeDlNpeId [in] npeId - id of target NPE
  174. *
  175. * Stops execution on an NPE by sending a Stop NPE command to the NPE.
  176. * Checks the execution status of the NPE to verify that it has stopped.
  177. *
  178. * @pre
  179. *
  180. * @post
  181. *
  182. * @return
  183. * - IX_SUCCESS if the operation was successful
  184. * - IX_FAIL otherwise
  185. */
  186. IX_STATUS
  187. ixNpeDlNpeMgrNpeStop (IxNpeDlNpeId npeId);
  188. /**
  189. * @fn void ixNpeDlNpeMgrStatsShow (void)
  190. *
  191. * @brief This function will display statistics of the IxNpeDl NpeMgr module
  192. *
  193. * @return none
  194. */
  195. void
  196. ixNpeDlNpeMgrStatsShow (void);
  197. /**
  198. * @fn void ixNpeDlNpeMgrStatsReset (void)
  199. *
  200. * @brief This function will reset the statistics of the IxNpeDl NpeMgr module
  201. *
  202. * @return none
  203. */
  204. void
  205. ixNpeDlNpeMgrStatsReset (void);
  206. #endif /* IXNPEDLIMAGEMGR_P_H */
  207. /**
  208. * @} defgroup IxNpeDlNpeMgr_p
  209. */