lib/sw_services/xilsem/src/client/xsem_client_api.c
XStatus XSem_CmdCfrInit(XIpiPsu *IpiInst, XSemIpiResp *Resp)
{
	XStatus Status = XST_FAILURE;
	u32 Payload[PAYLOAD_ARG_CNT] = {0U};
	u32 Response[RESPONSE_ARG_CNT] = {0U};

	if (NULL == IpiInst) {
		XSem_Dbg("[%s] ERROR: IpiInst is NULL\n\r", __func__);
		goto END;
	}

	if (NULL == Resp) {
		XSem_Dbg("[%s] ERROR: Resp is NULL\n\r", __func__);
		goto END;
	}

	PACK_PAYLOAD1(Payload, CMD_ID_CFR_INIT);

	Status = XSem_IpiSendReqPlm(IpiInst, Payload);
	if (XST_SUCCESS != Status) {
		XSem_Dbg("[%s] ERROR: XSem_IpiSendReqPlm failed with " \
				"ErrCode 0x%x\n\r", __func__, Status);
		goto END;
	}

	Status = XSem_IpiPlmRespMsg(IpiInst, Response);
	if (XST_SUCCESS != Status) {
		XSem_Dbg("[%s] ERROR: XSem_IpiPlmRespMsg failed with " \
				"ErrCode 0x%x\n\r", __func__, Status);
		goto END;
	}

	Resp->RespMsg1 = Response[1U];
	Resp->RespMsg2 = Response[2U];

	XSem_Dbg("[%s] SUCCESS: 0x%x\n\r", __func__, Status);

END:
	return Status;
}
/****************************************************************************/
/**
 * @brief	This function is used to initialize CRAM scan from
 *		user application.
 *		Primarily this function sends an IPI request to PLM to start
 *		CRAM Scan Initialization, waits for PLM to process the
 *		request and reads the response message.
 *
 * @param[in]	IpiInst		Pointer to IPI driver instance
 * @param[out]	Resp		Structure Pointer of IPI response.
 *		- Resp->RespMsg1: Acknowledgment ID of CRAM Initialization
 *		- Resp->RespMsg2: Status of CRAM Initialization
 *
 * @return	This API returns the success or failure.
 *		- XST_FAILURE: On CRAM Initialization failure
 *		- XST_SUCCESS: On CRAM Initialization success
 *****************************************************************************/
@brief       This function is used to initialize CRAM scan from
user application.
Primarily this function sends an IPI request to PLM to start
CRAM Scan Initialization, waits for PLM to process the
request and reads the response message.

@param[in]   IpiInst         Pointer to IPI driver instance
@param[out]  Resp            Structure Pointer of IPI response.
- Resp->RespMsg1: Acknowledgment ID of CRAM Initialization
- Resp->RespMsg2: Status of CRAM Initialization

@return      This API returns the success or failure.
- XST_FAILURE: On CRAM Initialization failure
- XST_SUCCESS: On CRAM Initialization success
@brief This function is used to initialize CRAM scan from user application . Primarily this function sends an IPI request to PLM to start CRAM Scan Initialization waits for PLM to process the request and reads the response message . @param [ in ] IpiInst Pointer to IPI driver instance @param [ out ] Resp Structure Pointer of IPI response . - Resp - > RespMsg1 : Acknowledgment ID of CRAM Initialization - Resp - > RespMsg2 : Status of CRAM Initialization @return This API returns the success or failure . - XST_FAILURE : On CRAM Initialization failure - XST_SUCCESS : On CRAM Initialization success
XStatus XSem_CmdCfrInit(XIpiPsu *IpiInst, XSemIpiResp *Resp)
{
	XStatus Status = XST_FAILURE;
	u32 Payload[PAYLOAD_ARG_CNT] = {0U};
	u32 Response[RESPONSE_ARG_CNT] = {0U};
	if (NULL == IpiInst) {
		XSem_Dbg("[%s] ERROR: IpiInst is NULL\n\r", __func__);
		goto END;
	}
	if (NULL == Resp) {
		XSem_Dbg("[%s] ERROR: Resp is NULL\n\r", __func__);
		goto END;
	}
	PACK_PAYLOAD1(Payload, CMD_ID_CFR_INIT);
	Status = XSem_IpiSendReqPlm(IpiInst, Payload);
	if (XST_SUCCESS != Status) {
		XSem_Dbg("[%s] ERROR: XSem_IpiSendReqPlm failed with " \
				"ErrCode 0x%x\n\r", __func__, Status);
		goto END;
	}
	Status = XSem_IpiPlmRespMsg(IpiInst, Response);
	if (XST_SUCCESS != Status) {
		XSem_Dbg("[%s] ERROR: XSem_IpiPlmRespMsg failed with " \
				"ErrCode 0x%x\n\r", __func__, Status);
		goto END;
	}
	Resp->RespMsg1 = Response[1U];
	Resp->RespMsg2 = Response[2U];
	XSem_Dbg("[%s] SUCCESS: 0x%x\n\r", __func__, Status);
END:
	return Status;
}
XStatus XSem_CmdCfrInit ( XIpiPsu * IpiInst , XSemIpiResp * Resp ) { XStatus Status = XST_FAILURE ; u32 Payload [ PAYLOAD_ARG_CNT ] = { 0U } ; u32 Response [ RESPONSE_ARG_CNT ] = { 0U } ; if ( NULL == IpiInst ) { XSem_Dbg ( " \n \r " , __func__ ) ; goto END ; } if ( NULL == Resp ) { XSem_Dbg ( " \n \r " , __func__ ) ; goto END ; } PACK_PAYLOAD1 ( Payload , CMD_ID_CFR_INIT ) ; Status = XSem_IpiSendReqPlm ( IpiInst , Payload ) ; if ( XST_SUCCESS != Status ) { XSem_Dbg ( " " " \n \r " , __func__ , Status ) ; goto END ; } Status = XSem_IpiPlmRespMsg ( IpiInst , Response ) ; if ( XST_SUCCESS != Status ) { XSem_Dbg ( " " " \n \r " , __func__ , Status ) ; goto END ; } Resp -> RespMsg1 = Response [ 1U ] ; Resp -> RespMsg2 = Response [ 2U ] ; XSem_Dbg ( " \n \r " , __func__ , Status ) ; END : return Status ; }
@brief       This function is used to initialize CRAM scan from
              user application.
@brief This function is used to initialize CRAM scan from user application .