rse_comms_protocol_pointer_access.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2022, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__
  8. #define __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__
  9. #include <cdefs.h>
  10. #include <psa/client.h>
  11. struct __packed rse_pointer_access_msg_t {
  12. psa_handle_t handle;
  13. uint32_t ctrl_param;
  14. uint32_t io_sizes[PSA_MAX_IOVEC];
  15. uint64_t host_ptrs[PSA_MAX_IOVEC];
  16. };
  17. struct __packed rse_pointer_access_reply_t {
  18. int32_t return_val;
  19. uint32_t out_sizes[PSA_MAX_IOVEC];
  20. };
  21. psa_status_t rse_protocol_pointer_access_serialize_msg(psa_handle_t handle,
  22. int16_t type,
  23. const psa_invec *in_vec,
  24. uint8_t in_len,
  25. const psa_outvec *out_vec,
  26. uint8_t out_len,
  27. struct rse_pointer_access_msg_t *msg,
  28. size_t *msg_len);
  29. psa_status_t rse_protocol_pointer_access_deserialize_reply(psa_outvec *out_vec,
  30. uint8_t out_len,
  31. psa_status_t *return_val,
  32. const struct rse_pointer_access_reply_t *reply,
  33. size_t reply_size);
  34. #endif /* __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__ */