lib/sw_services/xilsem/examples/xsem_cram_example.c
void XSem_IpiCallback(XIpiPsu *const InstancePtr)
{
	int Status;
	u32 Payload[PAYLOAD_ARG_CNT] = {0};


	Status = XIpiPsu_ReadMessage(&IpiInst, SRC_IPI_MASK, Payload, \
			PAYLOAD_ARG_CNT, XIPIPSU_BUF_TYPE_MSG);
	if (Status != XST_SUCCESS) {
		xil_printf("ERROR #%d while reading IPI buffer\n", Status);
		return;
	}

	if ((XSEM_EVENT_ERROR == Payload[0]) && \
			(XSEM_NOTIFY_CRAM == Payload[1])) {
		if (XSEM_EVENT_CRAM_UNCOR_ECC_ERR == Payload[2]) {
			EventCnt_UnCorEcc = 1U;
		} else if (XSEM_EVENT_CRAM_CRC_ERR == Payload[2]) {
			EventCnt_Crc = 1U;
		} else if (XSEM_EVENT_CRAM_INT_ERR == Payload[2]) {
			xil_printf("[ALERT] Received internal error event" \
				" notification from XilSEM\n\r");
			EventCnt_IntErr = 1U;
		} else if (XSEM_EVENT_CRAM_COR_ECC_ERR == Payload[2]) {
			EventCnt_CorEcc = 1U;
		} else {
			xil_printf("%s Someother callback received: %d:%d:%d\n",
					__func__, Payload[0], \
					Payload[1], Payload[2]);
		}
	} else {
		xil_printf("%s Some other callback received: %d\n", \
				__func__, Payload[0]);
	}
}
/******************************************************************************
 * @brief	IpiCallback to receive event messages
 *
 * @param[in]	InstancePtr : Pointer to IPI driver instance
 *
 *****************************************************************************/
@brief       IpiCallback to receive event messages
@param[in]   InstancePtr : Pointer to IPI driver instance
@brief IpiCallback to receive event messages @param [ in ] InstancePtr : Pointer to IPI driver instance
void XSem_IpiCallback(XIpiPsu *const InstancePtr)
{
	int Status;
	u32 Payload[PAYLOAD_ARG_CNT] = {0};
	Status = XIpiPsu_ReadMessage(&IpiInst, SRC_IPI_MASK, Payload, \
			PAYLOAD_ARG_CNT, XIPIPSU_BUF_TYPE_MSG);
	if (Status != XST_SUCCESS) {
		xil_printf("ERROR #%d while reading IPI buffer\n", Status);
		return;
	}
	if ((XSEM_EVENT_ERROR == Payload[0]) && \
			(XSEM_NOTIFY_CRAM == Payload[1])) {
		if (XSEM_EVENT_CRAM_UNCOR_ECC_ERR == Payload[2]) {
			EventCnt_UnCorEcc = 1U;
		} else if (XSEM_EVENT_CRAM_CRC_ERR == Payload[2]) {
			EventCnt_Crc = 1U;
		} else if (XSEM_EVENT_CRAM_INT_ERR == Payload[2]) {
			xil_printf("[ALERT] Received internal error event" \
				" notification from XilSEM\n\r");
			EventCnt_IntErr = 1U;
		} else if (XSEM_EVENT_CRAM_COR_ECC_ERR == Payload[2]) {
			EventCnt_CorEcc = 1U;
		} else {
			xil_printf("%s Someother callback received: %d:%d:%d\n",
					__func__, Payload[0], \
					Payload[1], Payload[2]);
		}
	} else {
		xil_printf("%s Some other callback received: %d\n", \
				__func__, Payload[0]);
	}
}
void XSem_IpiCallback ( XIpiPsu * const InstancePtr ) { int Status ; u32 Payload [ PAYLOAD_ARG_CNT ] = { 0 } ; Status = XIpiPsu_ReadMessage ( & IpiInst , SRC_IPI_MASK , Payload , PAYLOAD_ARG_CNT , XIPIPSU_BUF_TYPE_MSG ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n " , Status ) ; return ; } if ( ( XSEM_EVENT_ERROR == Payload [ 0 ] ) && ( XSEM_NOTIFY_CRAM == Payload [ 1 ] ) ) { if ( XSEM_EVENT_CRAM_UNCOR_ECC_ERR == Payload [ 2 ] ) { EventCnt_UnCorEcc = 1U ; } else if ( XSEM_EVENT_CRAM_CRC_ERR == Payload [ 2 ] ) { EventCnt_Crc = 1U ; } else if ( XSEM_EVENT_CRAM_INT_ERR == Payload [ 2 ] ) { xil_printf ( " " " \n \r " ) ; EventCnt_IntErr = 1U ; } else if ( XSEM_EVENT_CRAM_COR_ECC_ERR == Payload [ 2 ] ) { EventCnt_CorEcc = 1U ; } else { xil_printf ( " \n " , __func__ , Payload [ 0 ] , Payload [ 1 ] , Payload [ 2 ] ) ; } } else { xil_printf ( " \n " , __func__ , Payload [ 0 ] ) ; } }
@brief       IpiCallback to receive event messages
 @param[in]   InstancePtr : Pointer to IPI driver instance
@brief IpiCallback to receive event messages @param [ in ] InstancePtr : Pointer to IPI driver instance