1 /* 2 * Copyright (c) 2026, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __SFCP_PSA_PROTOCOL_EMBED_H__ 9 #define __SFCP_PSA_PROTOCOL_EMBED_H__ 10 11 #include <cdefs.h> 12 13 #include "psa/client.h" 14 15 #include <platform_def.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 struct __packed sfcp_embed_msg_t { 22 psa_handle_t handle; 23 uint32_t ctrl_param; /* type, in_len, out_len */ 24 uint16_t io_size[PSA_MAX_IOVEC]; 25 uint8_t payload[PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE]; 26 }; 27 28 struct __packed sfcp_embed_reply_t { 29 int32_t return_val; 30 uint16_t out_size[PSA_MAX_IOVEC]; 31 uint8_t payload[PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE]; 32 }; 33 34 struct client_request_t; 35 36 psa_status_t sfcp_protocol_embed_serialize_msg( 37 psa_handle_t handle, int16_t type, const psa_invec *in_vec, 38 uint8_t in_len, const psa_outvec *out_vec, uint8_t out_len, 39 struct sfcp_embed_msg_t *msg, size_t *msg_len); 40 41 psa_status_t sfcp_protocol_embed_deserialize_reply( 42 psa_outvec *out_vec, uint8_t out_len, psa_status_t *return_val, 43 const struct sfcp_embed_reply_t *reply, size_t reply_size); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* __SFCP_PSA_PROTOCOL_EMBED_H__ */ 50