2 * @file IxNpeDlImageMgr_p.h
4 * @author Intel Corporation
5 * @date 14 December 2001
7 * @brief This file contains the private API for the ImageMgr module
11 * IXP400 SW Release version 2.0
13 * -- Copyright Notice --
16 * Copyright 2001-2005, Intel Corporation.
17 * All rights reserved.
20 * SPDX-License-Identifier: BSD-3-Clause
22 * -- End of Copyright Notice --
26 * @defgroup IxNpeDlImageMgr_p IxNpeDlImageMgr_p
28 * @brief The private API for the IxNpeDl ImageMgr module
33 #ifndef IXNPEDLIMAGEMGR_P_H
34 #define IXNPEDLIMAGEMGR_P_H
38 * Put the user defined include files required.
41 #include "IxOsalTypes.h"
49 * @def IX_NPEDL_IMAGEMGR_SIGNATURE
51 * @brief Signature found as 1st word in a microcode image library
53 #define IX_NPEDL_IMAGEMGR_SIGNATURE 0xDEADBEEF
56 * @def IX_NPEDL_IMAGEMGR_END_OF_HEADER
58 * @brief Marks end of header in a microcode image library
60 #define IX_NPEDL_IMAGEMGR_END_OF_HEADER 0xFFFFFFFF
63 * @def IX_NPEDL_IMAGEID_NPEID_OFFSET
65 * @brief Offset from LSB of NPE ID field in Image ID
67 #define IX_NPEDL_IMAGEID_NPEID_OFFSET 24
70 * @def IX_NPEDL_IMAGEID_DEVICEID_OFFSET
72 * @brief Offset from LSB of Device ID field in Image ID
74 #define IX_NPEDL_IMAGEID_DEVICEID_OFFSET 28
77 * @def IX_NPEDL_IMAGEID_FUNCTIONID_OFFSET
79 * @brief Offset from LSB of Functionality ID field in Image ID
81 #define IX_NPEDL_IMAGEID_FUNCTIONID_OFFSET 16
84 * @def IX_NPEDL_IMAGEID_MAJOR_OFFSET
86 * @brief Offset from LSB of Major revision field in Image ID
88 #define IX_NPEDL_IMAGEID_MAJOR_OFFSET 8
91 * @def IX_NPEDL_IMAGEID_MINOR_OFFSET
93 * @brief Offset from LSB of Minor revision field in Image ID
95 #define IX_NPEDL_IMAGEID_MINOR_OFFSET 0
99 * @def IX_NPEDL_NPEID_FROM_IMAGEID_GET
101 * @brief Macro to extract NPE ID field from Image ID
103 #define IX_NPEDL_NPEID_FROM_IMAGEID_GET(imageId) \
104 (((imageId) >> IX_NPEDL_IMAGEID_NPEID_OFFSET) & \
105 IX_NPEDL_NPEIMAGE_NPEID_MASK)
108 * @def IX_NPEDL_DEVICEID_FROM_IMAGEID_GET
110 * @brief Macro to extract NPE ID field from Image ID
112 #define IX_NPEDL_DEVICEID_FROM_IMAGEID_GET(imageId) \
113 (((imageId) >> IX_NPEDL_IMAGEID_DEVICEID_OFFSET) & \
114 IX_NPEDL_NPEIMAGE_DEVICEID_MASK)
117 * @def IX_NPEDL_FUNCTIONID_FROM_IMAGEID_GET
119 * @brief Macro to extract Functionality ID field from Image ID
121 #define IX_NPEDL_FUNCTIONID_FROM_IMAGEID_GET(imageId) \
122 (((imageId) >> IX_NPEDL_IMAGEID_FUNCTIONID_OFFSET) & \
123 IX_NPEDL_NPEIMAGE_FIELD_MASK)
126 * @def IX_NPEDL_MAJOR_FROM_IMAGEID_GET
128 * @brief Macro to extract Major revision field from Image ID
130 #define IX_NPEDL_MAJOR_FROM_IMAGEID_GET(imageId) \
131 (((imageId) >> IX_NPEDL_IMAGEID_MAJOR_OFFSET) & \
132 IX_NPEDL_NPEIMAGE_FIELD_MASK)
135 * @def IX_NPEDL_MINOR_FROM_IMAGEID_GET
137 * @brief Macro to extract Minor revision field from Image ID
139 #define IX_NPEDL_MINOR_FROM_IMAGEID_GET(imageId) \
140 (((imageId) >> IX_NPEDL_IMAGEID_MINOR_OFFSET) & \
141 IX_NPEDL_NPEIMAGE_FIELD_MASK)
145 * Prototypes for interface functions
149 * @fn IX_STATUS ixNpeDlImageMgrMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary)
151 * @brief This instructs NPE Downloader to use client-supplied microcode image library.
153 * This function sets NPE Downloader to use a client-supplied microcode image library
154 * instead of the standard image library which is included by the NPE Downloader.
156 * @note THIS FUNCTION HAS BEEN DEPRECATED AND SHOULD NOT BE USED.
157 * It will be removed in a future release.
158 * See API header file IxNpeDl.h for more information.
161 * - <i>clientImageLibrary</i> should point to a microcode image library valid for use
162 * by the NPE Downloader component.
165 * - the client-supplied image uibrary will be used for all subsequent operations
166 * performed by the NPE Downloader
169 * - IX_SUCCESS if the operation was successful
170 * - IX_FAIL if the client-supplied image library did not contain a valid signature
173 ixNpeDlImageMgrMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary);
177 * @fn IX_STATUS ixNpeDlImageMgrImageListExtract (IxNpeDlImageId *imageListPtr,
180 * @brief Extracts a list of images available in the NPE microcode image library.
182 * @param IxNpeDlImageId* [out] imageListPtr - pointer to array to contain
183 * a list of images. If NULL,
184 * only the number of images
187 * @param UINT32* [inout] numImages - As input, it points to a variable
188 * containing the number of images which
189 * can be stored in the
190 * <i>imageListPtr</i> array. Its value
191 * is ignored as input if
192 * <i>imageListPtr</i> is NULL. As an
193 * output, it will contain number of
194 * images in the image library.
196 * This function reads the header of the microcode image library and extracts a list of the
197 * images available in the image library. It can also be used to find the number of
198 * images in the image library.
200 * @note THIS FUNCTION HAS BEEN DEPRECATED AND SHOULD NOT BE USED.
201 * It will be removed in a future release.
202 * See API header file IxNpeDl.h for more information.
205 * - if <i>imageListPtr</i> != NULL, <i>numImages</i> should reflect the
206 * number of image Id elements the <i>imageListPtr</i> can contain.
209 * - <i>numImages</i> will reflect the number of image Id's found in the
210 * microcode image library.
213 * - IX_SUCCESS if the operation was successful
214 * - IX_FAIL otherwise
217 ixNpeDlImageMgrImageListExtract (IxNpeDlImageId *imageListPtr,
222 * @fn IX_STATUS ixNpeDlImageMgrImageLocate (IxNpeDlImageId *imageId,
226 * @brief Finds a image block in the NPE microcode image library.
228 * @param IxNpeDlImageId* [in] imageId - the id of the image to locate
229 * @param UINT32** [out] imagePtr - pointer to the image in memory
230 * @param UINT32* [out] imageSize - size (in 32-bit words) of image
232 * This function examines the header of the microcode image library for the location
233 * and size of the specified image.
235 * @note THIS FUNCTION HAS BEEN DEPRECATED AND SHOULD NOT BE USED.
236 * It will be removed in a future release.
237 * See API header file IxNpeDl.h for more information.
244 * - IX_SUCCESS if the operation was successful
245 * - IX_FAIL otherwise
248 ixNpeDlImageMgrImageLocate (IxNpeDlImageId *imageId,
253 * @fn IX_STATUS ixNpeDlImageMgrLatestImageExtract (IxNpeDlImageId *imageId)
255 * @brief Finds the most recent version of an image in the NPE image library.
257 * @param IxNpeDlImageId* [inout] imageId - the id of the image
259 * This function determines the most recent version of a specified image by its
260 * higest major release and minor revision numbers
262 * @note THIS FUNCTION HAS BEEN DEPRECATED AND SHOULD NOT BE USED.
263 * It will be removed in a future release.
264 * See API header file IxNpeDl.h for more information.
271 * - IX_SUCCESS if the operation was successful
272 * - IX_FAIL otherwise
275 ixNpeDlImageMgrLatestImageExtract (IxNpeDlImageId *imageId);
278 * @fn void ixNpeDlImageMgrStatsShow (void)
280 * @brief This function will display the statistics of the IxNpeDl ImageMgr
286 ixNpeDlImageMgrStatsShow (void);
290 * @fn void ixNpeDlImageMgrStatsReset (void)
292 * @brief This function will reset the statistics of the IxNpeDl ImageMgr
298 ixNpeDlImageMgrStatsReset (void);
302 * @fn IX_STATUS ixNpeDlImageMgrImageGet (UINT32 *imageLibrary,
307 * @brief Finds a image block in the NPE microcode image library.
309 * @param UINT32* [in] imageLibrary - the image library to use
310 * @param UINT32 [in] imageId - the id of the image to locate
311 * @param UINT32** [out] imagePtr - pointer to the image in memory
312 * @param UINT32* [out] imageSize - size (in 32-bit words) of image
314 * This function examines the header of the specified microcode image library
315 * for the location and size of the specified image. It returns a pointer to
316 * the image in the <i>imagePtr</i> parameter.
317 * If no image library is specified (imageLibrary == NULL), then the default
318 * built-in image library will be used.
325 * - IX_SUCCESS if the operation was successful
326 * - IX_FAIL otherwise
329 ixNpeDlImageMgrImageFind (UINT32 *imageLibrary,
335 #endif /* IXNPEDLIMAGEMGR_P_H */
338 * @} defgroup IxNpeDlImageMgr_p