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