lib/sw_services/xilloader/src/xloader.c
static int XLoader_InvalidateChildImgInfo(u32 ParentImgID, u32 *ChangeCount)
{
	int Status = XST_FAILURE;
	u32 TempCount = 0;
	u32 IsChild;
	u32 Index;
	u32 NodeId;

	for (Index = 0U; Index < XLOADER_IMAGE_INFO_TBL_MAX_NUM; Index++) {
		if (TempCount >= ImageInfoTbl.Count) {
			break;
		}
		NodeId = NODESUBCLASS(ImageInfoTbl.TblPtr[Index].ImgID);
		/*
		 * Only PL and AIE images are supporting hierarchical DFX,
		 * so only those image entries need to be invalidated
		 */
		if ((NodeId != (u32)XPM_NODESUBCL_DEV_PL) &&
			(NodeId != (u32)XPM_NODESUBCL_DEV_AIE)) {
			continue;
		}
		Status = XLoader_GetChildRelation(
			ImageInfoTbl.TblPtr[Index].ImgID, ParentImgID, &IsChild);
		if (Status != XST_SUCCESS) {
			goto END;
		}
		if (IsChild == (u32)TRUE) {
			ImageInfoTbl.TblPtr[Index].ImgID = XLOADER_INVALID_IMG_ID;
			ImageInfoTbl.Count--;
			(*ChangeCount)++;
			if (ImageInfoTbl.IsBufferFull == (u8)TRUE) {
				ImageInfoTbl.IsBufferFull = (u8)FALSE;
			}
		}
		else if (ImageInfoTbl.TblPtr[Index].ImgID != XLOADER_INVALID_IMG_ID) {
			TempCount++;
		}
		else {
			/* For MISRA-C */
		}
	}
	Status = XST_SUCCESS;

END:
	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function invalidates the child image info entries
 * corresponding to the parent image id in the ImageInfo Table
 *
 * @param	ParentImgID whose corresponding child image info entries are
 * invalidated
 * @param	ChangeCount points to ChangeCount that has to be modified
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
 *****************************************************************************/
@brief       This function invalidates the child image info entries
corresponding to the parent image id in the ImageInfo Table

@param       ParentImgID whose corresponding child image info entries are
invalidated
@param       ChangeCount points to ChangeCount that has to be modified

@return      XST_SUCCESS on success and error code on failure
@brief This function invalidates the child image info entries corresponding to the parent image id in the ImageInfo Table @param ParentImgID whose corresponding child image info entries are invalidated @param ChangeCount points to ChangeCount that has to be modified @return XST_SUCCESS on success and error code on failure
static int XLoader_InvalidateChildImgInfo(u32 ParentImgID, u32 *ChangeCount)
{
	int Status = XST_FAILURE;
	u32 TempCount = 0;
	u32 IsChild;
	u32 Index;
	u32 NodeId;
	for (Index = 0U; Index < XLOADER_IMAGE_INFO_TBL_MAX_NUM; Index++) {
		if (TempCount >= ImageInfoTbl.Count) {
			break;
		}
		NodeId = NODESUBCLASS(ImageInfoTbl.TblPtr[Index].ImgID);
		if ((NodeId != (u32)XPM_NODESUBCL_DEV_PL) &&
			(NodeId != (u32)XPM_NODESUBCL_DEV_AIE)) {
			continue;
		}
		Status = XLoader_GetChildRelation(
			ImageInfoTbl.TblPtr[Index].ImgID, ParentImgID, &IsChild);
		if (Status != XST_SUCCESS) {
			goto END;
		}
		if (IsChild == (u32)TRUE) {
			ImageInfoTbl.TblPtr[Index].ImgID = XLOADER_INVALID_IMG_ID;
			ImageInfoTbl.Count--;
			(*ChangeCount)++;
			if (ImageInfoTbl.IsBufferFull == (u8)TRUE) {
				ImageInfoTbl.IsBufferFull = (u8)FALSE;
			}
		}
		else if (ImageInfoTbl.TblPtr[Index].ImgID != XLOADER_INVALID_IMG_ID) {
			TempCount++;
		}
		else {
		}
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
static int XLoader_InvalidateChildImgInfo ( u32 ParentImgID , u32 * ChangeCount ) { int Status = XST_FAILURE ; u32 TempCount = 0 ; u32 IsChild ; u32 Index ; u32 NodeId ; for ( Index = 0U ; Index < XLOADER_IMAGE_INFO_TBL_MAX_NUM ; Index ++ ) { if ( TempCount >= ImageInfoTbl . Count ) { break ; } NodeId = NODESUBCLASS ( ImageInfoTbl . TblPtr [ Index ] . ImgID ) ; if ( ( NodeId != ( u32 ) XPM_NODESUBCL_DEV_PL ) && ( NodeId != ( u32 ) XPM_NODESUBCL_DEV_AIE ) ) { continue ; } Status = XLoader_GetChildRelation ( ImageInfoTbl . TblPtr [ Index ] . ImgID , ParentImgID , & IsChild ) ; if ( Status != XST_SUCCESS ) { goto END ; } if ( IsChild == ( u32 ) TRUE ) { ImageInfoTbl . TblPtr [ Index ] . ImgID = XLOADER_INVALID_IMG_ID ; ImageInfoTbl . Count -- ; ( * ChangeCount ) ++ ; if ( ImageInfoTbl . IsBufferFull == ( u8 ) TRUE ) { ImageInfoTbl . IsBufferFull = ( u8 ) FALSE ; } } else if ( ImageInfoTbl . TblPtr [ Index ] . ImgID != XLOADER_INVALID_IMG_ID ) { TempCount ++ ; } else { } } Status = XST_SUCCESS ; END : return Status ; }
@brief       This function invalidates the child image info entries
 corresponding to the parent image id in the ImageInfo Table
@brief This function invalidates the child image info entries corresponding to the parent image id in the ImageInfo Table
/*
		 * Only PL and AIE images are supporting hierarchical DFX,
		 * so only those image entries need to be invalidated
		 */ /* For MISRA-C */