lib/sw_services/xilloader/src/xloader_cmd.c
static int XLoader_LoadDdrCpyImg(XPlmi_Cmd *Cmd)
{
	int Status = XST_FAILURE;
	u32 ImgId = Cmd->Payload[XLOADER_CMD_DDR_CPY_IMGID_INDEX];
	u32 *FuncID = (Cmd->Len > XLOADER_CMD_DDR_CPY_FUNCID_INDEX) ?
		(&Cmd->Payload[XLOADER_CMD_DDR_CPY_FUNCID_INDEX]) : NULL;
	XilPdi* PdiPtr = BootPdiPtr;

	PdiPtr->IpiMask = Cmd->IpiMask;
	XPlmi_Printf(DEBUG_INFO, "%s \n\r", __func__);

	XPlmi_SetPlmMode(XPLMI_MODE_CONFIGURATION);

	Status = XLoader_RestartImage(ImgId, FuncID);
	if (Status != XST_SUCCESS) {
		/* Update the error code */
		XPlmi_ErrMgr(Status);
	}

	XPlmi_SetPlmMode(XPLMI_MODE_OPERATIONAL);
	Cmd->Response[XLOADER_RESP_CMD_EXEC_STATUS_INDEX] = (u32)Status;
	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function provides load DDR copy image execution.
 * Command payload parameters are
 *	* Img ID - of ddr copied image
 *	* Func ID - to verify with the FuncID of the image copied to DDR
 *
 * @param	Cmd is pointer to the command structure
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
 *****************************************************************************/
@brief       This function provides load DDR copy image execution.
Command payload parameters are
Img ID - of ddr copied image
Func ID - to verify with the FuncID of the image copied to DDR

@param       Cmd is pointer to the command structure

@return      XST_SUCCESS on success and error code on failure
@brief This function provides load DDR copy image execution . Command payload parameters are Img ID - of ddr copied image Func ID - to verify with the FuncID of the image copied to DDR @param Cmd is pointer to the command structure @return XST_SUCCESS on success and error code on failure
static int XLoader_LoadDdrCpyImg(XPlmi_Cmd *Cmd)
{
	int Status = XST_FAILURE;
	u32 ImgId = Cmd->Payload[XLOADER_CMD_DDR_CPY_IMGID_INDEX];
	u32 *FuncID = (Cmd->Len > XLOADER_CMD_DDR_CPY_FUNCID_INDEX) ?
		(&Cmd->Payload[XLOADER_CMD_DDR_CPY_FUNCID_INDEX]) : NULL;
	XilPdi* PdiPtr = BootPdiPtr;
	PdiPtr->IpiMask = Cmd->IpiMask;
	XPlmi_Printf(DEBUG_INFO, "%s \n\r", __func__);
	XPlmi_SetPlmMode(XPLMI_MODE_CONFIGURATION);
	Status = XLoader_RestartImage(ImgId, FuncID);
	if (Status != XST_SUCCESS) {
		XPlmi_ErrMgr(Status);
	}
	XPlmi_SetPlmMode(XPLMI_MODE_OPERATIONAL);
	Cmd->Response[XLOADER_RESP_CMD_EXEC_STATUS_INDEX] = (u32)Status;
	return Status;
}
static int XLoader_LoadDdrCpyImg ( XPlmi_Cmd * Cmd ) { int Status = XST_FAILURE ; u32 ImgId = Cmd -> Payload [ XLOADER_CMD_DDR_CPY_IMGID_INDEX ] ; u32 * FuncID = ( Cmd -> Len > XLOADER_CMD_DDR_CPY_FUNCID_INDEX ) ? ( & Cmd -> Payload [ XLOADER_CMD_DDR_CPY_FUNCID_INDEX ] ) : NULL ; XilPdi * PdiPtr = BootPdiPtr ; PdiPtr -> IpiMask = Cmd -> IpiMask ; XPlmi_Printf ( DEBUG_INFO , " \n \r " , __func__ ) ; XPlmi_SetPlmMode ( XPLMI_MODE_CONFIGURATION ) ; Status = XLoader_RestartImage ( ImgId , FuncID ) ; if ( Status != XST_SUCCESS ) { XPlmi_ErrMgr ( Status ) ; } XPlmi_SetPlmMode ( XPLMI_MODE_OPERATIONAL ) ; Cmd -> Response [ XLOADER_RESP_CMD_EXEC_STATUS_INDEX ] = ( u32 ) Status ; return Status ; }
@brief       This function provides load DDR copy image execution.
@brief This function provides load DDR copy image execution .
/* Update the error code */