📄 ixnpedl.h
字号:
/** * @file IxNpeDl.h * * @date 14 December 2001 * @brief This file contains the public API of the IXP400 NPE Downloader * component. * * * @par * IXP400 SW Release version 2.1 * * -- Copyright Notice -- * * @par * Copyright (c) 2001-2005, Intel Corporation. * All rights reserved. * * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * @par * -- End of Copyright Notice --*//** * @defgroup IxNpeDl Intel (R) IXP400 Software NPE-Downloader (IxNpeDl) API * * @brief The Public API for the IXP400 NPE Downloader * * @{ */#ifndef IXNPEDL_H#define IXNPEDL_H/* * Put the user defined include files required */#include "IxOsalTypes.h"#include "IxNpeMicrocode.h"/* * #defines for function return types, etc. *//** * @def IX_NPEDL_PARAM_ERR * * @brief NpeDl function return value for a parameter error */#define IX_NPEDL_PARAM_ERR 2/** * @def IX_NPEDL_RESOURCE_ERR * * @brief NpeDl function return value for a resource error */#define IX_NPEDL_RESOURCE_ERR 3/** * @def IX_NPEDL_CRITICAL_NPE_ERR * * @brief NpeDl function return value for a Critical NPE error occuring during download. Assume NPE is left in unstable condition if this value is returned or NPE is hang / halt. */#define IX_NPEDL_CRITICAL_NPE_ERR 4/** * @def IX_NPEDL_CRITICAL_MICROCODE_ERR * * @brief NpeDl function return value for a Critical Microcode error * discovered during download. Assume NPE is left in unstable condition * if this value is returned. */#define IX_NPEDL_CRITICAL_MICROCODE_ERR 5/** * @def IX_NPEDL_DEVICE_ERR * * @brief NpeDl function return value when image being downloaded * is not meant for the device in use */#define IX_NPEDL_DEVICE_ERR 6 /** * @defgroup NPEImageID Intel (R) IXP400 Software NPE Image ID Definition * * @ingroup IxNpeDl * * @brief Definition of NPE Image ID to be passed to ixNpeDlNpeInitAndStart() * as input of type UINT32 which has the following fields format: * * Field [Bit Location] <BR> * -------------------- <BR> * Device ID [31 - 28] <BR> * NPE ID [27 - 24] <BR> * NPE Functionality ID [23 - 16] <BR> * Major Release Number [15 - 8] <BR> * Minor Release Number [7 - 0] <BR> * * * @{ *//** * @def IX_NPEDL_NPEIMAGE_FIELD_MASK * * @brief Mask for NPE Image ID's Field * * @warning <b>THIS #define HAS BEEN DEPRECATED AND SHOULD NOT BE USED.</b> * It will be removed in a future release. * See @ref ixNpeDlNpeInitAndStart for more information. */#define IX_NPEDL_NPEIMAGE_FIELD_MASK 0xff/** * @def IX_NPEDL_NPEIMAGE_NPEID_MASK * * @brief Mask for NPE Image NPE ID's Field * */#define IX_NPEDL_NPEIMAGE_NPEID_MASK 0xf/** * @def IX_NPEDL_NPEIMAGE_DEVICEID_MASK * * @brief Mask for NPE Image Device ID's Field * */#define IX_NPEDL_NPEIMAGE_DEVICEID_MASK 0xf/* * Typedefs *//* * Enums *//** * @brief NpeId numbers to identify NPE A, B or C * @note In this context, for B0 Silicon of the Intel (R) IXP42X Product Line:<br> * - NPE-A has HDLC, HSS, AAL and UTOPIA Coprocessors.<br> * - NPE-B has Ethernet Coprocessor.<br> * - NPE-C has Ethernet, AES, DES and HASH Coprocessors.<br> * - Intel (R) IXP4XX Product Line of Network Processors * have different combinations of coprocessors. */typedef enum{ IX_NPEDL_NPEID_NPEA = 0, /**< Identifies NPE A */ IX_NPEDL_NPEID_NPEB, /**< Identifies NPE B */ IX_NPEDL_NPEID_NPEC, /**< Identifies NPE C */ IX_NPEDL_NPEID_MAX /**< Total Number of NPEs */} IxNpeDlNpeId;/** * @brief NPE Port ID numbers to identify NPE A, B or C */typedef enum{ IX_NPEB_PORT = 0, /**< Identifies NPE B */ IX_NPEC_PORT, /**< Identifies NPE C */ IX_NPEA_PORT /**< Identifies NPE A */} IxNpePortId;/* * Structs *//* * Prototypes for interface functions *//** * @ingroup IxNpeDl * * @fn PUBLIC IX_STATUS ixNpeDlNpeInitAndStart (UINT32 imageId) * * @brief Stop, reset, download microcode (firmware) and finally start NPE. * * @param imageId UINT32 [in] - Id of the microcode image to download. * * This function locates the image specified by the <i>imageId</i> parameter * from the default microcode image library which is included internally by * this component. * It then stops and resets the NPE, loads the firmware image onto the NPE, * and then restarts the NPE. * * @note A list of valid image IDs is included in this header file. * See #defines with prefix IX_NPEDL_NPEIMAGE_... * * @note This function, along with @ref ixNpeDlCustomImageNpeInitAndStart * and @ref ixNpeDlLoadedImageFunctionalityGet, supercedes the following * functions which are deprecated and will be removed completely in a * future release: * - @ref ixNpeDlNpeExecutionStop * - @ref ixNpeDlNpeStopAndReset * - @ref ixNpeDlNpeExecutionStart * * @pre * - The Client is responsible for ensuring mutual access to the NPE. * @post * - The NPE Instruction Pipeline will be cleared if State Information * has been downloaded. * - If the download fails with a critical error, the NPE may * be left in an ususable state. * @return * - IX_SUCCESS if the download was successful; * - IX_NPEDL_PARAM_ERR if a parameter error occured * - IX_NPEDL_CRITICAL_NPE_ERR if a critical NPE error occured during * download * - IX_NPEDL_CRITICAL_MICROCODE_ERR if a critical microcode error * occured during download * - IX_NPEDL_DEVICE_ERR if the image being loaded is not meant for * the device currently running. * - IX_FAIL if NPE is not available or image is failed to be located. * A warning is issued if the NPE is not present. */PUBLIC IX_STATUSixNpeDlNpeInitAndStart (UINT32 npeImageId);/** * @ingroup IxNpeDl * * @fn PUBLIC IX_STATUS ixNpeDlCustomImageNpeInitAndStart (UINT32 *imageLibrary, UINT32 imageId) *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -