optee_ta_avb.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* SPDX-License-Identifier: BSD-2-Clause */
  2. /* Copyright (c) 2018, Linaro Limited */
  3. #ifndef __TA_AVB_H
  4. #define __TA_AVB_H
  5. #define TA_AVB_UUID { 0x023f8f1a, 0x292a, 0x432b, \
  6. { 0x8f, 0xc4, 0xde, 0x84, 0x71, 0x35, 0x80, 0x67 } }
  7. #define TA_AVB_MAX_ROLLBACK_LOCATIONS 256
  8. /*
  9. * Gets the rollback index corresponding to the given rollback index slot.
  10. *
  11. * in params[0].value.a: rollback index slot
  12. * out params[1].value.a: upper 32 bits of rollback index
  13. * out params[1].value.b: lower 32 bits of rollback index
  14. */
  15. #define TA_AVB_CMD_READ_ROLLBACK_INDEX 0
  16. /*
  17. * Updates the rollback index corresponding to the given rollback index slot.
  18. *
  19. * Will refuse to update a slot with a lower value.
  20. *
  21. * in params[0].value.a: rollback index slot
  22. * in params[1].value.a: upper 32 bits of rollback index
  23. * in params[1].value.b: lower 32 bits of rollback index
  24. */
  25. #define TA_AVB_CMD_WRITE_ROLLBACK_INDEX 1
  26. /*
  27. * Gets the lock state of the device.
  28. *
  29. * out params[0].value.a: lock state
  30. */
  31. #define TA_AVB_CMD_READ_LOCK_STATE 2
  32. /*
  33. * Sets the lock state of the device.
  34. *
  35. * If the lock state is changed all rollback slots will be reset to 0
  36. *
  37. * in params[0].value.a: lock state
  38. */
  39. #define TA_AVB_CMD_WRITE_LOCK_STATE 3
  40. /*
  41. * Reads a persistent value corresponding to the given name.
  42. *
  43. * in params[0].u.memref: persistent value name
  44. * out params[1].u.memref: read persistent value buffer
  45. */
  46. #define TA_AVB_CMD_READ_PERSIST_VALUE 4
  47. /*
  48. * Writes a persistent value corresponding to the given name.
  49. *
  50. * in params[0].u.memref: persistent value name
  51. * in params[1].u.memref: persistent value buffer to write
  52. */
  53. #define TA_AVB_CMD_WRITE_PERSIST_VALUE 5
  54. #endif /* __TA_AVB_H */