lib/sw_services/xilsecure/src/versal/server/xsecure_elliptic_ipihandler.c
int XSecure_EllipticIpiHandler(XPlmi_Cmd *Cmd)
{
	volatile int Status = XST_FAILURE;
	u32 *Pload = Cmd->Payload;

	switch (Cmd->CmdId & XSECURE_API_ID_MASK) {
	case XSECURE_API(XSECURE_API_ELLIPTIC_GENERATE_KEY):
		Status = XSecure_EllipticGenKey(Pload[0], Pload[1], Pload[2],
				Pload[3], Pload[4]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_GENERATE_SIGN):
		Status = XSecure_EllipticGenSign(Pload[0], Pload[1], Pload[2],
				Pload[3]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_VALIDATE_KEY):
		Status = XSecure_EllipticValidatePubKey(Pload[0], Pload[1],
				Pload[2]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_VERIFY_SIGN):
		Status = XSecure_EllipticVerifySignature(Pload[0], Pload[1]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_KAT):
		Status = XSecure_EllipticExecuteKat(Pload[0]);
		break;
	default:
		XSecure_Printf(XSECURE_DEBUG_GENERAL, "CMD: INVALID PARAM\r\n");
		Status = XST_INVALID_PARAM;
		break;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief       This function calls respective IPI handler based on the API_ID
 *
 * @param 	Cmd is pointer to the command structure
 *
 * @return	- XST_SUCCESS - If the handler execution is successful
 * 		- ErrorCode - If there is a failure
 *
 ******************************************************************************/
@brief       This function calls respective IPI handler based on the API_ID
@param       Cmd is pointer to the command structure

@return      - XST_SUCCESS - If the handler execution is successful
- ErrorCode - If there is a failure
@brief This function calls respective IPI handler based on the API_ID @param Cmd is pointer to the command structure @return - XST_SUCCESS - If the handler execution is successful - ErrorCode - If there is a failure
int XSecure_EllipticIpiHandler(XPlmi_Cmd *Cmd)
{
	volatile int Status = XST_FAILURE;
	u32 *Pload = Cmd->Payload;
	switch (Cmd->CmdId & XSECURE_API_ID_MASK) {
	case XSECURE_API(XSECURE_API_ELLIPTIC_GENERATE_KEY):
		Status = XSecure_EllipticGenKey(Pload[0], Pload[1], Pload[2],
				Pload[3], Pload[4]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_GENERATE_SIGN):
		Status = XSecure_EllipticGenSign(Pload[0], Pload[1], Pload[2],
				Pload[3]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_VALIDATE_KEY):
		Status = XSecure_EllipticValidatePubKey(Pload[0], Pload[1],
				Pload[2]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_VERIFY_SIGN):
		Status = XSecure_EllipticVerifySignature(Pload[0], Pload[1]);
		break;
	case XSECURE_API(XSECURE_API_ELLIPTIC_KAT):
		Status = XSecure_EllipticExecuteKat(Pload[0]);
		break;
	default:
		XSecure_Printf(XSECURE_DEBUG_GENERAL, "CMD: INVALID PARAM\r\n");
		Status = XST_INVALID_PARAM;
		break;
	}
	return Status;
}
int XSecure_EllipticIpiHandler ( XPlmi_Cmd * Cmd ) { volatile int Status = XST_FAILURE ; u32 * Pload = Cmd -> Payload ; switch ( Cmd -> CmdId & XSECURE_API_ID_MASK ) { case XSECURE_API ( XSECURE_API_ELLIPTIC_GENERATE_KEY ) : Status = XSecure_EllipticGenKey ( Pload [ 0 ] , Pload [ 1 ] , Pload [ 2 ] , Pload [ 3 ] , Pload [ 4 ] ) ; break ; case XSECURE_API ( XSECURE_API_ELLIPTIC_GENERATE_SIGN ) : Status = XSecure_EllipticGenSign ( Pload [ 0 ] , Pload [ 1 ] , Pload [ 2 ] , Pload [ 3 ] ) ; break ; case XSECURE_API ( XSECURE_API_ELLIPTIC_VALIDATE_KEY ) : Status = XSecure_EllipticValidatePubKey ( Pload [ 0 ] , Pload [ 1 ] , Pload [ 2 ] ) ; break ; case XSECURE_API ( XSECURE_API_ELLIPTIC_VERIFY_SIGN ) : Status = XSecure_EllipticVerifySignature ( Pload [ 0 ] , Pload [ 1 ] ) ; break ; case XSECURE_API ( XSECURE_API_ELLIPTIC_KAT ) : Status = XSecure_EllipticExecuteKat ( Pload [ 0 ] ) ; break ; default : XSecure_Printf ( XSECURE_DEBUG_GENERAL , " \r \n " ) ; Status = XST_INVALID_PARAM ; break ; } return Status ; }
@brief       This function calls respective IPI handler based on the API_ID
 @param       Cmd is pointer to the command structure
@brief This function calls respective IPI handler based on the API_ID @param Cmd is pointer to the command structure