lib/sw_services/xilnvm/src/server/xnvm_cmd.c
static int XNvm_FeaturesCmd(u32 ApiId)
{
	int Status = XST_INVALID_PARAM;

	switch (ApiId) {
	case XNVM_BBRAM_WRITE_AES_KEY:
	case XNVM_BBRAM_ZEROIZE:
	case XNVM_BBRAM_WRITE_USER_DATA:
	case XNVM_BBRAM_READ_USER_DATA:
	case XNVM_BBRAM_LOCK_WRITE_USER_DATA:
	case XNVM_EFUSE_WRITE:
	case XNVM_EFUSE_READ_IV:
	case XNVM_EFUSE_READ_REVOCATION_ID:
	case XNVM_EFUSE_READ_OFFCHIP_REVOCATION_ID:
	case XNVM_EFUSE_READ_USER_FUSES:
	case XNVM_EFUSE_READ_MISC_CTRL_BITS:
	case XNVM_EFUSE_READ_SEC_CTRL_BITS:
	case XNVM_EFUSE_READ_SEC_MISC1_BITS:
	case XNVM_EFUSE_READ_BOOT_ENV_CTRL_BITS:
	case XNVM_EFUSE_READ_PUF_SEC_CTRL_BITS:
	case XNVM_EFUSE_READ_PPK_HASH:
	case XNVM_EFUSE_READ_DEC_EFUSE_ONLY:
	case XNVM_EFUSE_READ_DNA:
#ifdef XNVM_ACCESS_PUF_USER_DATA
	case XNVM_EFUSE_READ_PUF_USER_FUSE:
	case XNVM_EFUSE_PUF_USER_FUSE_WRITE:
#else
	case XNVM_EFUSE_READ_PUF:
	case XNVM_EFUSE_WRITE_PUF:
#endif
		Status = XST_SUCCESS;
		break;
	default:
		XNvm_Printf(XNVM_DEBUG_GENERAL, "Cmd not supported\r\n");
		Status = XST_INVALID_PARAM;
		break;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function checks for the supported features based on the
 * 		requested API ID
 *
 * @param	ApiId	ApiId to check the supported features
 *
 * @return 	XST_SUCCESS		if the requested API ID is supported
 * 		XST_INVALID_PARAM	On invalid command
 *
 *****************************************************************************/
@brief       This function checks for the supported features based on the
requested API ID

@param       ApiId   ApiId to check the supported features

@return      XST_SUCCESS             if the requested API ID is supported
XST_INVALID_PARAM       On invalid command
@brief This function checks for the supported features based on the requested API ID @param ApiId ApiId to check the supported features @return XST_SUCCESS if the requested API ID is supported XST_INVALID_PARAM On invalid command
static int XNvm_FeaturesCmd(u32 ApiId)
{
	int Status = XST_INVALID_PARAM;
	switch (ApiId) {
	case XNVM_BBRAM_WRITE_AES_KEY:
	case XNVM_BBRAM_ZEROIZE:
	case XNVM_BBRAM_WRITE_USER_DATA:
	case XNVM_BBRAM_READ_USER_DATA:
	case XNVM_BBRAM_LOCK_WRITE_USER_DATA:
	case XNVM_EFUSE_WRITE:
	case XNVM_EFUSE_READ_IV:
	case XNVM_EFUSE_READ_REVOCATION_ID:
	case XNVM_EFUSE_READ_OFFCHIP_REVOCATION_ID:
	case XNVM_EFUSE_READ_USER_FUSES:
	case XNVM_EFUSE_READ_MISC_CTRL_BITS:
	case XNVM_EFUSE_READ_SEC_CTRL_BITS:
	case XNVM_EFUSE_READ_SEC_MISC1_BITS:
	case XNVM_EFUSE_READ_BOOT_ENV_CTRL_BITS:
	case XNVM_EFUSE_READ_PUF_SEC_CTRL_BITS:
	case XNVM_EFUSE_READ_PPK_HASH:
	case XNVM_EFUSE_READ_DEC_EFUSE_ONLY:
	case XNVM_EFUSE_READ_DNA:
#ifdef XNVM_ACCESS_PUF_USER_DATA
	case XNVM_EFUSE_READ_PUF_USER_FUSE:
	case XNVM_EFUSE_PUF_USER_FUSE_WRITE:
#else
	case XNVM_EFUSE_READ_PUF:
	case XNVM_EFUSE_WRITE_PUF:
#endif
		Status = XST_SUCCESS;
		break;
	default:
		XNvm_Printf(XNVM_DEBUG_GENERAL, "Cmd not supported\r\n");
		Status = XST_INVALID_PARAM;
		break;
	}
	return Status;
}
static int XNvm_FeaturesCmd ( u32 ApiId ) { int Status = XST_INVALID_PARAM ; switch ( ApiId ) { case XNVM_BBRAM_WRITE_AES_KEY : case XNVM_BBRAM_ZEROIZE : case XNVM_BBRAM_WRITE_USER_DATA : case XNVM_BBRAM_READ_USER_DATA : case XNVM_BBRAM_LOCK_WRITE_USER_DATA : case XNVM_EFUSE_WRITE : case XNVM_EFUSE_READ_IV : case XNVM_EFUSE_READ_REVOCATION_ID : case XNVM_EFUSE_READ_OFFCHIP_REVOCATION_ID : case XNVM_EFUSE_READ_USER_FUSES : case XNVM_EFUSE_READ_MISC_CTRL_BITS : case XNVM_EFUSE_READ_SEC_CTRL_BITS : case XNVM_EFUSE_READ_SEC_MISC1_BITS : case XNVM_EFUSE_READ_BOOT_ENV_CTRL_BITS : case XNVM_EFUSE_READ_PUF_SEC_CTRL_BITS : case XNVM_EFUSE_READ_PPK_HASH : case XNVM_EFUSE_READ_DEC_EFUSE_ONLY : case XNVM_EFUSE_READ_DNA : #ifdef XNVM_ACCESS_PUF_USER_DATA case XNVM_EFUSE_READ_PUF_USER_FUSE : case XNVM_EFUSE_PUF_USER_FUSE_WRITE : #else case XNVM_EFUSE_READ_PUF : case XNVM_EFUSE_WRITE_PUF : #endif Status = XST_SUCCESS ; break ; default : XNvm_Printf ( XNVM_DEBUG_GENERAL , " \r \n " ) ; Status = XST_INVALID_PARAM ; break ; } return Status ; }
@brief       This function checks for the supported features based on the
              requested API ID
@brief This function checks for the supported features based on the requested API ID