/* The caller can determine if functions defined in the Arm TRNG ABI are present in the ABI implementation. */
STATIC RETURN_STATUS EFIAPI GetArmTrngFeatures(IN CONST UINT32 FunctionId, OUT UINT32 *Capability OPTIONAL)
/* The caller can determine if functions defined in the Arm TRNG ABI are present in the ABI implementation. */
STATIC RETURN_STATUS EFIAPI GetArmTrngFeatures(IN CONST UINT32 FunctionId, OUT UINT32 *Capability OPTIONAL)
{
  ARM_MONITOR_ARGS  Parameters;
  RETURN_STATUS     Status;
  ZeroMem (&Parameters, sizeof (Parameters));
  Parameters.Arg0 = ARM_SMC_ID_TRNG_FEATURES;
  Parameters.Arg1 = FunctionId;
  ArmMonitorCall (&Parameters);
  Status = TrngStatusToReturnStatus (Parameters.Arg0);
  if (RETURN_ERROR (Status)) {
    return Status;
  }
  if (Capability != NULL) {
    *Capability = (UINT32)Parameters.Arg0;
  }
  return RETURN_SUCCESS;
}