1 /* 2 * Copyright (c) 2022, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __RSS_COMMS_H__ 9 #define __RSS_COMMS_H__ 10 11 #include "psa/client.h" 12 #include "cmsis_compiler.h" 13 #include "rss_comms_atu.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 /* size suits to get_attest_token() */ 20 #define RSS_COMMS_PAYLOAD_MAX_SIZE (0x40 + 0x800) 21 22 /* 23 * Allocated for each client request. 24 * 25 * TODO: Sizing of payload_buf, this should be platform dependent: 26 * - sum in_vec size 27 * - sum out_vec size 28 */ 29 struct client_request_t { 30 uint8_t protocol_ver; 31 uint8_t seq_num; 32 uint16_t client_id; 33 psa_handle_t handle; 34 int32_t type; 35 uint32_t in_len; 36 uint32_t out_len; 37 psa_invec in_vec[PSA_MAX_IOVEC]; 38 psa_outvec out_vec[PSA_MAX_IOVEC]; 39 int32_t return_val; 40 uint64_t out_vec_host_addr[PSA_MAX_IOVEC]; 41 uint8_t param_copy_buf[RSS_COMMS_PAYLOAD_MAX_SIZE]; 42 comms_atu_region_set_t atu_regions; 43 }; 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* __RSS_COMMS_H__ */ 50