teei_tee_api.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef TEEI_TEE_API_H
  2. #define TEEI_TEE_API_H
  3. #include <teei_common_types.h>
  4. #define TYPE_UINT_DEFINED
  5. #ifndef TYPE_UINT_DEFINED
  6. #define uint32_t (unsigned int)
  7. #define uint16_t (unsigned short)
  8. #ifndef _STDINT_H
  9. #define uint8_t (char)
  10. #endif
  11. #endif
  12. /**
  13. * @brief Error codes
  14. *
  15. */
  16. enum TEEC_Result {
  17. /*!The operation succeeded. \n*/
  18. TEEC_SUCCESS = 0x0,
  19. /*!Non-specific cause.*/
  20. TEEC_ERROR_GENERIC = 0xFFFF0000,
  21. /*!Access privileges are not sufficient.*/
  22. TEEC_ERROR_ACCESS_DENIED = 0xFFFF0001 ,
  23. /*!The operation was cancelled.*/
  24. TEEC_ERROR_CANCEL = 0xFFFF0002 ,
  25. /*!Concurrent accesses caused conflict.*/
  26. TEEC_ERROR_ACCESS_CONFLICT = 0xFFFF0003 ,
  27. /*!Too much data for the requested operation was passed.*/
  28. TEEC_ERROR_EXCESS_DATA = 0xFFFF0004 ,
  29. /*!Input data was of invalid format.*/
  30. TEEC_ERROR_BAD_FORMAT = 0xFFFF0005 ,
  31. /*!Input parameters were invalid.*/
  32. TEEC_ERROR_BAD_PARAMETERS = 0xFFFF0006 ,
  33. /*!Operation is not valid in the current state.*/
  34. TEEC_ERROR_BAD_STATE = 0xFFFF0007,
  35. /*!The requested data item is not found.*/
  36. TEEC_ERROR_ITEM_NOT_FOUND = 0xFFFF0008,
  37. /*!The requested operation should exist but is not yet implemented.*/
  38. TEEC_ERROR_NOT_IMPLEMENTED = 0xFFFF0009,
  39. /*!The requested operation is valid but is not supported in this
  40. * Implementation.*/
  41. TEEC_ERROR_NOT_SUPPORTED = 0xFFFF000A,
  42. /*!Expected data was missing.*/
  43. TEEC_ERROR_NO_DATA = 0xFFFF000B,
  44. /*!System ran out of resources.*/
  45. TEEC_ERROR_OUT_OF_MEMORY = 0xFFFF000C,
  46. /*!The system is busy working on something else. */
  47. TEEC_ERROR_BUSY = 0xFFFF000D,
  48. /*!Communication with a remote party failed.*/
  49. TEEC_ERROR_COMMUNICATION = 0xFFFF000E,
  50. /*!A security fault was detected.*/
  51. TEEC_ERROR_SECURITY = 0xFFFF000F,
  52. /*!The supplied buffer is too short for the generated output.*/
  53. TEEC_ERROR_SHORT_BUFFER = 0xFFFF0010,
  54. /*! The MAC value supplied is different from the one calculated */
  55. TEEC_ERROR_MAC_INVALID = 0xFFFF3071,
  56. };
  57. #define TEE_Result (uint32_t)
  58. #define TEEC_Result TEE_Result
  59. #endif