refactor(rse): change all occurrences of RSS to RSE

Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I9f72ad36ec233d7eaac3ce9e2f2b010130e1fa94
This commit is contained in:
Tamas Ban 2024-02-21 12:42:00 +01:00
parent 3857898f66
commit e249e56954
10 changed files with 110 additions and 110 deletions

View file

@ -9,16 +9,16 @@
#include <common/debug.h> #include <common/debug.h>
#include <drivers/arm/mhu.h> #include <drivers/arm/mhu.h>
#include <drivers/arm/rss_comms.h> #include <drivers/arm/rse_comms.h>
#include <psa/client.h> #include <psa/client.h>
#include <rss_comms_protocol.h> #include <rse_comms_protocol.h>
/* Union as message space and reply space are never used at the same time, and this saves space as /* Union as message space and reply space are never used at the same time, and this saves space as
* we can overlap them. * we can overlap them.
*/ */
union __packed __attribute__((aligned(4))) rss_comms_io_buffer_t { union __packed __attribute__((aligned(4))) rse_comms_io_buffer_t {
struct serialized_rss_comms_msg_t msg; struct serialized_rse_comms_msg_t msg;
struct serialized_rss_comms_reply_t reply; struct serialized_rse_comms_reply_t reply;
}; };
static uint8_t select_protocol_version(const psa_invec *in_vec, size_t in_len, static uint8_t select_protocol_version(const psa_invec *in_vec, size_t in_len,
@ -40,13 +40,13 @@ static uint8_t select_protocol_version(const psa_invec *in_vec, size_t in_len,
comms_mhu_msg_size = mhu_get_max_message_size(); comms_mhu_msg_size = mhu_get_max_message_size();
comms_embed_msg_min_size = sizeof(struct serialized_rss_comms_header_t) + comms_embed_msg_min_size = sizeof(struct serialized_rse_comms_header_t) +
sizeof(struct rss_embed_msg_t) - sizeof(struct rse_embed_msg_t) -
PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE; PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE;
comms_embed_reply_min_size = sizeof(struct serialized_rss_comms_header_t) + comms_embed_reply_min_size = sizeof(struct serialized_rse_comms_header_t) +
sizeof(struct rss_embed_reply_t) - sizeof(struct rse_embed_reply_t) -
PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE; PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE;
/* Use embed if we can pack into one message and reply, else use /* Use embed if we can pack into one message and reply, else use
* pointer_access. The underlying MHU transport protocol uses a * pointer_access. The underlying MHU transport protocol uses a
@ -63,9 +63,9 @@ static uint8_t select_protocol_version(const psa_invec *in_vec, size_t in_len,
comms_mhu_msg_size - sizeof(uint32_t)) || comms_mhu_msg_size - sizeof(uint32_t)) ||
(comms_embed_reply_min_size + out_size_total > (comms_embed_reply_min_size + out_size_total >
comms_mhu_msg_size - sizeof(uint32_t))) { comms_mhu_msg_size - sizeof(uint32_t))) {
return RSS_COMMS_PROTOCOL_POINTER_ACCESS; return RSE_COMMS_PROTOCOL_POINTER_ACCESS;
} else { } else {
return RSS_COMMS_PROTOCOL_EMBED; return RSE_COMMS_PROTOCOL_EMBED;
} }
} }
@ -75,7 +75,7 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec
/* Declared statically to avoid using huge amounts of stack space. Maybe revisit if /* Declared statically to avoid using huge amounts of stack space. Maybe revisit if
* functions not being reentrant becomes a problem. * functions not being reentrant becomes a problem.
*/ */
static union rss_comms_io_buffer_t io_buf; static union rse_comms_io_buffer_t io_buf;
enum mhu_error_t err; enum mhu_error_t err;
psa_status_t status; psa_status_t status;
static uint8_t seq_num = 1U; static uint8_t seq_num = 1U;
@ -94,13 +94,13 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec
io_buf.msg.header.client_id = 1U, io_buf.msg.header.client_id = 1U,
io_buf.msg.header.protocol_ver = select_protocol_version(in_vec, in_len, out_vec, out_len); io_buf.msg.header.protocol_ver = select_protocol_version(in_vec, in_len, out_vec, out_len);
status = rss_protocol_serialize_msg(handle, type, in_vec, in_len, out_vec, status = rse_protocol_serialize_msg(handle, type, in_vec, in_len, out_vec,
out_len, &io_buf.msg, &msg_size); out_len, &io_buf.msg, &msg_size);
if (status != PSA_SUCCESS) { if (status != PSA_SUCCESS) {
return status; return status;
} }
VERBOSE("[RSS-COMMS] Sending message\n"); VERBOSE("[RSE-COMMS] Sending message\n");
VERBOSE("protocol_ver=%u\n", io_buf.msg.header.protocol_ver); VERBOSE("protocol_ver=%u\n", io_buf.msg.header.protocol_ver);
VERBOSE("seq_num=%u\n", io_buf.msg.header.seq_num); VERBOSE("seq_num=%u\n", io_buf.msg.header.seq_num);
VERBOSE("client_id=%u\n", io_buf.msg.header.client_id); VERBOSE("client_id=%u\n", io_buf.msg.header.client_id);
@ -117,7 +117,7 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec
#if DEBUG #if DEBUG
/* /*
* Poisoning the message buffer (with a known pattern). * Poisoning the message buffer (with a known pattern).
* Helps in detecting hypothetical RSS communication bugs. * Helps in detecting hypothetical RSE communication bugs.
*/ */
memset(&io_buf.msg, 0xA5, msg_size); memset(&io_buf.msg, 0xA5, msg_size);
#endif #endif
@ -127,12 +127,12 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec
return PSA_ERROR_COMMUNICATION_FAILURE; return PSA_ERROR_COMMUNICATION_FAILURE;
} }
VERBOSE("[RSS-COMMS] Received reply\n"); VERBOSE("[RSE-COMMS] Received reply\n");
VERBOSE("protocol_ver=%u\n", io_buf.reply.header.protocol_ver); VERBOSE("protocol_ver=%u\n", io_buf.reply.header.protocol_ver);
VERBOSE("seq_num=%u\n", io_buf.reply.header.seq_num); VERBOSE("seq_num=%u\n", io_buf.reply.header.seq_num);
VERBOSE("client_id=%u\n", io_buf.reply.header.client_id); VERBOSE("client_id=%u\n", io_buf.reply.header.client_id);
status = rss_protocol_deserialize_reply(out_vec, out_len, &return_val, status = rse_protocol_deserialize_reply(out_vec, out_len, &return_val,
&io_buf.reply, reply_size); &io_buf.reply, reply_size);
if (status != PSA_SUCCESS) { if (status != PSA_SUCCESS) {
return status; return status;
@ -152,16 +152,16 @@ psa_status_t psa_call(psa_handle_t handle, int32_t type, const psa_invec *in_vec
return return_val; return return_val;
} }
int rss_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base) int rse_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base)
{ {
enum mhu_error_t err; enum mhu_error_t err;
err = mhu_init_sender(mhu_sender_base); err = mhu_init_sender(mhu_sender_base);
if (err != MHU_ERR_NONE) { if (err != MHU_ERR_NONE) {
if (err == MHU_ERR_ALREADY_INIT) { if (err == MHU_ERR_ALREADY_INIT) {
INFO("[RSS-COMMS] Host to RSS MHU driver already initialized\n"); INFO("[RSE-COMMS] Host to RSE MHU driver already initialized\n");
} else { } else {
ERROR("[RSS-COMMS] Host to RSS MHU driver initialization failed: %d\n", err); ERROR("[RSE-COMMS] Host to RSE MHU driver initialization failed: %d\n", err);
return -1; return -1;
} }
} }
@ -169,9 +169,9 @@ int rss_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base)
err = mhu_init_receiver(mhu_receiver_base); err = mhu_init_receiver(mhu_receiver_base);
if (err != MHU_ERR_NONE) { if (err != MHU_ERR_NONE) {
if (err == MHU_ERR_ALREADY_INIT) { if (err == MHU_ERR_ALREADY_INIT) {
INFO("[RSS-COMMS] RSS to Host MHU driver already initialized\n"); INFO("[RSE-COMMS] RSE to Host MHU driver already initialized\n");
} else { } else {
ERROR("[RSS-COMMS] RSS to Host MHU driver initialization failed: %d\n", err); ERROR("[RSE-COMMS] RSE to Host MHU driver initialization failed: %d\n", err);
return -1; return -1;
} }
} }

View file

@ -4,25 +4,25 @@
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
$(warning "RSS driver is an experimental feature") $(warning "RSE driver is an experimental feature")
RSS_COMMS_SOURCES := $(addprefix drivers/arm/rss/, \ RSE_COMMS_SOURCES := $(addprefix drivers/arm/rse/, \
rss_comms.c \ rse_comms.c \
rss_comms_protocol.c \ rse_comms_protocol.c \
rss_comms_protocol_embed.c \ rse_comms_protocol_embed.c \
rss_comms_protocol_pointer_access.c \ rse_comms_protocol_pointer_access.c \
) )
# Default to MHUv2 if PLAT_MHU_VERSION undefined # Default to MHUv2 if PLAT_MHU_VERSION undefined
PLAT_MHU_VERSION ?= 2 PLAT_MHU_VERSION ?= 2
ifeq (${PLAT_MHU_VERSION}, 3) ifeq (${PLAT_MHU_VERSION}, 3)
RSS_COMMS_SOURCES += $(addprefix drivers/arm/mhu/, \ RSE_COMMS_SOURCES += $(addprefix drivers/arm/mhu/, \
mhu_v3_x.c \ mhu_v3_x.c \
mhu_wrapper_v3_x.c \ mhu_wrapper_v3_x.c \
) )
else ifeq (${PLAT_MHU_VERSION}, 2) else ifeq (${PLAT_MHU_VERSION}, 2)
RSS_COMMS_SOURCES += $(addprefix drivers/arm/mhu/, \ RSE_COMMS_SOURCES += $(addprefix drivers/arm/mhu/, \
mhu_v2_x.c \ mhu_v2_x.c \
mhu_wrapper_v2_x.c \ mhu_wrapper_v2_x.c \
) )
@ -30,5 +30,5 @@ else
$(error Unsupported MHU version) $(error Unsupported MHU version)
endif endif
PLAT_INCLUDES += -Idrivers/arm/rss \ PLAT_INCLUDES += -Idrivers/arm/rse \
-Idrivers/arm/mhu -Idrivers/arm/mhu

View file

@ -7,15 +7,15 @@
#include <assert.h> #include <assert.h>
#include <common/debug.h> #include <common/debug.h>
#include "rss_comms_protocol.h" #include "rse_comms_protocol.h"
psa_status_t rss_protocol_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct serialized_rss_comms_msg_t *msg, struct serialized_rse_comms_msg_t *msg,
size_t *msg_len) size_t *msg_len)
{ {
psa_status_t status; psa_status_t status;
@ -25,15 +25,15 @@ psa_status_t rss_protocol_serialize_msg(psa_handle_t handle,
assert(in_vec != NULL); assert(in_vec != NULL);
switch (msg->header.protocol_ver) { switch (msg->header.protocol_ver) {
case RSS_COMMS_PROTOCOL_EMBED: case RSE_COMMS_PROTOCOL_EMBED:
status = rss_protocol_embed_serialize_msg(handle, type, in_vec, in_len, out_vec, status = rse_protocol_embed_serialize_msg(handle, type, in_vec, in_len, out_vec,
out_len, &msg->msg.embed, msg_len); out_len, &msg->msg.embed, msg_len);
if (status != PSA_SUCCESS) { if (status != PSA_SUCCESS) {
return status; return status;
} }
break; break;
case RSS_COMMS_PROTOCOL_POINTER_ACCESS: case RSE_COMMS_PROTOCOL_POINTER_ACCESS:
status = rss_protocol_pointer_access_serialize_msg(handle, type, in_vec, in_len, status = rse_protocol_pointer_access_serialize_msg(handle, type, in_vec, in_len,
out_vec, out_len, out_vec, out_len,
&msg->msg.pointer_access, &msg->msg.pointer_access,
msg_len); msg_len);
@ -45,26 +45,26 @@ psa_status_t rss_protocol_serialize_msg(psa_handle_t handle,
return PSA_ERROR_NOT_SUPPORTED; return PSA_ERROR_NOT_SUPPORTED;
} }
*msg_len += sizeof(struct serialized_rss_comms_header_t); *msg_len += sizeof(struct serialized_rse_comms_header_t);
return PSA_SUCCESS; return PSA_SUCCESS;
} }
psa_status_t rss_protocol_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct serialized_rss_comms_reply_t *reply, const struct serialized_rse_comms_reply_t *reply,
size_t reply_size) size_t reply_size)
{ {
assert(reply != NULL); assert(reply != NULL);
assert(return_val != NULL); assert(return_val != NULL);
switch (reply->header.protocol_ver) { switch (reply->header.protocol_ver) {
case RSS_COMMS_PROTOCOL_EMBED: case RSE_COMMS_PROTOCOL_EMBED:
return rss_protocol_embed_deserialize_reply(out_vec, out_len, return_val, return rse_protocol_embed_deserialize_reply(out_vec, out_len, return_val,
&reply->reply.embed, reply_size); &reply->reply.embed, reply_size);
case RSS_COMMS_PROTOCOL_POINTER_ACCESS: case RSE_COMMS_PROTOCOL_POINTER_ACCESS:
return rss_protocol_pointer_access_deserialize_reply(out_vec, out_len, return_val, return rse_protocol_pointer_access_deserialize_reply(out_vec, out_len, return_val,
&reply->reply.pointer_access, &reply->reply.pointer_access,
reply_size); reply_size);
default: default:

View file

@ -5,63 +5,63 @@
* *
*/ */
#ifndef __RSS_COMMS_PROTOCOL_H__ #ifndef __RSE_COMMS_PROTOCOL_H__
#define __RSS_COMMS_PROTOCOL_H__ #define __RSE_COMMS_PROTOCOL_H__
#include <cdefs.h> #include <cdefs.h>
#include <stdint.h> #include <stdint.h>
#include <psa/client.h> #include <psa/client.h>
#include "rss_comms_protocol_embed.h" #include "rse_comms_protocol_embed.h"
#include "rss_comms_protocol_pointer_access.h" #include "rse_comms_protocol_pointer_access.h"
enum rss_comms_protocol_version_t { enum rse_comms_protocol_version_t {
RSS_COMMS_PROTOCOL_EMBED = 0, RSE_COMMS_PROTOCOL_EMBED = 0,
RSS_COMMS_PROTOCOL_POINTER_ACCESS = 1, RSE_COMMS_PROTOCOL_POINTER_ACCESS = 1,
}; };
struct __packed serialized_rss_comms_header_t { struct __packed serialized_rse_comms_header_t {
uint8_t protocol_ver; uint8_t protocol_ver;
uint8_t seq_num; uint8_t seq_num;
uint16_t client_id; uint16_t client_id;
}; };
/* MHU message passed from Host to RSS to deliver a PSA client call */ /* MHU message passed from Host to RSE to deliver a PSA client call */
struct __packed serialized_rss_comms_msg_t { struct __packed serialized_rse_comms_msg_t {
struct serialized_rss_comms_header_t header; struct serialized_rse_comms_header_t header;
union __packed { union __packed {
struct rss_embed_msg_t embed; struct rse_embed_msg_t embed;
struct rss_pointer_access_msg_t pointer_access; struct rse_pointer_access_msg_t pointer_access;
} msg; } msg;
}; };
/* MHU reply message to hold the PSA client reply result returned by RSS */ /* MHU reply message to hold the PSA client reply result returned by RSE */
struct __packed serialized_rss_comms_reply_t { struct __packed serialized_rse_comms_reply_t {
struct serialized_rss_comms_header_t header; struct serialized_rse_comms_header_t header;
union __packed { union __packed {
struct rss_embed_reply_t embed; struct rse_embed_reply_t embed;
struct rss_pointer_access_reply_t pointer_access; struct rse_pointer_access_reply_t pointer_access;
} reply; } reply;
}; };
/* in_len and out_len are uint8_ts, therefore if there are more than 255 iovecs /* in_len and out_len are uint8_ts, therefore if there are more than 255 iovecs
* an error may occur. * an error may occur.
*/ */
CASSERT(PSA_MAX_IOVEC <= UINT8_MAX, assert_rss_comms_max_iovec_too_large); CASSERT(PSA_MAX_IOVEC <= UINT8_MAX, assert_rse_comms_max_iovec_too_large);
psa_status_t rss_protocol_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct serialized_rss_comms_msg_t *msg, struct serialized_rse_comms_msg_t *msg,
size_t *msg_len); size_t *msg_len);
psa_status_t rss_protocol_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct serialized_rss_comms_reply_t *reply, const struct serialized_rse_comms_reply_t *reply,
size_t reply_size); size_t reply_size);
#endif /* __RSS_COMMS_PROTOCOL_H__ */ #endif /* __RSE_COMMS_PROTOCOL_H__ */

View file

@ -17,8 +17,8 @@
* Res: Reserved. * Res: Reserved.
*/ */
#ifndef RSS_COMMS_PROTOCOL_COMMON #ifndef RSE_COMMS_PROTOCOL_COMMON
#define RSS_COMMS_PROTOCOL_COMMON #define RSE_COMMS_PROTOCOL_COMMON
#define TYPE_OFFSET (0U) #define TYPE_OFFSET (0U)
#define TYPE_MASK (0xFFFFUL << TYPE_OFFSET) #define TYPE_MASK (0xFFFFUL << TYPE_OFFSET)
@ -32,4 +32,4 @@
((((uint32_t)(in_len)) << IN_LEN_OFFSET) & IN_LEN_MASK) | \ ((((uint32_t)(in_len)) << IN_LEN_OFFSET) & IN_LEN_MASK) | \
((((uint32_t)(out_len)) << OUT_LEN_OFFSET) & OUT_LEN_MASK)) ((((uint32_t)(out_len)) << OUT_LEN_OFFSET) & OUT_LEN_MASK))
#endif /* RSS_COMMS_PROTOCOL_COMMON */ #endif /* RSE_COMMS_PROTOCOL_COMMON */

View file

@ -9,16 +9,16 @@
#include <string.h> #include <string.h>
#include <common/debug.h> #include <common/debug.h>
#include "rss_comms_protocol_common.h" #include "rse_comms_protocol_common.h"
#include "rss_comms_protocol_embed.h" #include "rse_comms_protocol_embed.h"
psa_status_t rss_protocol_embed_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_embed_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct rss_embed_msg_t *msg, struct rse_embed_msg_t *msg,
size_t *msg_len) size_t *msg_len)
{ {
uint32_t payload_size = 0; uint32_t payload_size = 0;
@ -55,10 +55,10 @@ psa_status_t rss_protocol_embed_serialize_msg(psa_handle_t handle,
return PSA_SUCCESS; return PSA_SUCCESS;
} }
psa_status_t rss_protocol_embed_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_embed_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct rss_embed_reply_t *reply, const struct rse_embed_reply_t *reply,
size_t reply_size) size_t reply_size)
{ {
uint32_t payload_offset = 0; uint32_t payload_offset = 0;

View file

@ -5,8 +5,8 @@
* *
*/ */
#ifndef __RSS_COMMS_PROTOCOL_EMBED_H__ #ifndef __RSE_COMMS_PROTOCOL_EMBED_H__
#define __RSS_COMMS_PROTOCOL_EMBED_H__ #define __RSE_COMMS_PROTOCOL_EMBED_H__
#include <cdefs.h> #include <cdefs.h>
@ -16,32 +16,32 @@
struct __packed rss_embed_msg_t { struct __packed rse_embed_msg_t {
psa_handle_t handle; psa_handle_t handle;
uint32_t ctrl_param; /* type, in_len, out_len */ uint32_t ctrl_param; /* type, in_len, out_len */
uint16_t io_size[PSA_MAX_IOVEC]; uint16_t io_size[PSA_MAX_IOVEC];
uint8_t trailer[PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE]; uint8_t trailer[PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE];
}; };
struct __packed rss_embed_reply_t { struct __packed rse_embed_reply_t {
int32_t return_val; int32_t return_val;
uint16_t out_size[PSA_MAX_IOVEC]; uint16_t out_size[PSA_MAX_IOVEC];
uint8_t trailer[PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE]; uint8_t trailer[PLAT_RSE_COMMS_PAYLOAD_MAX_SIZE];
}; };
psa_status_t rss_protocol_embed_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_embed_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct rss_embed_msg_t *msg, struct rse_embed_msg_t *msg,
size_t *msg_len); size_t *msg_len);
psa_status_t rss_protocol_embed_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_embed_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct rss_embed_reply_t *reply, const struct rse_embed_reply_t *reply,
size_t reply_size); size_t reply_size);
#endif /* __RSS_COMMS_PROTOCOL_EMBED_H__ */ #endif /* __RSE_COMMS_PROTOCOL_EMBED_H__ */

View file

@ -6,16 +6,16 @@
*/ */
#include <assert.h> #include <assert.h>
#include "rss_comms_protocol_common.h" #include "rse_comms_protocol_common.h"
#include "rss_comms_protocol_pointer_access.h" #include "rse_comms_protocol_pointer_access.h"
psa_status_t rss_protocol_pointer_access_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_pointer_access_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct rss_pointer_access_msg_t *msg, struct rse_pointer_access_msg_t *msg,
size_t *msg_len) size_t *msg_len)
{ {
unsigned int i; unsigned int i;
@ -42,10 +42,10 @@ psa_status_t rss_protocol_pointer_access_serialize_msg(psa_handle_t handle,
return PSA_SUCCESS; return PSA_SUCCESS;
} }
psa_status_t rss_protocol_pointer_access_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_pointer_access_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct rss_pointer_access_reply_t *reply, const struct rse_pointer_access_reply_t *reply,
size_t reply_size) size_t reply_size)
{ {
unsigned int i; unsigned int i;

View file

@ -5,38 +5,38 @@
* *
*/ */
#ifndef __RSS_COMMS_PROTOCOL_POINTER_ACCESS_H__ #ifndef __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__
#define __RSS_COMMS_PROTOCOL_POINTER_ACCESS_H__ #define __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__
#include <cdefs.h> #include <cdefs.h>
#include <psa/client.h> #include <psa/client.h>
struct __packed rss_pointer_access_msg_t { struct __packed rse_pointer_access_msg_t {
psa_handle_t handle; psa_handle_t handle;
uint32_t ctrl_param; uint32_t ctrl_param;
uint32_t io_sizes[PSA_MAX_IOVEC]; uint32_t io_sizes[PSA_MAX_IOVEC];
uint64_t host_ptrs[PSA_MAX_IOVEC]; uint64_t host_ptrs[PSA_MAX_IOVEC];
}; };
struct __packed rss_pointer_access_reply_t { struct __packed rse_pointer_access_reply_t {
int32_t return_val; int32_t return_val;
uint32_t out_sizes[PSA_MAX_IOVEC]; uint32_t out_sizes[PSA_MAX_IOVEC];
}; };
psa_status_t rss_protocol_pointer_access_serialize_msg(psa_handle_t handle, psa_status_t rse_protocol_pointer_access_serialize_msg(psa_handle_t handle,
int16_t type, int16_t type,
const psa_invec *in_vec, const psa_invec *in_vec,
uint8_t in_len, uint8_t in_len,
const psa_outvec *out_vec, const psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
struct rss_pointer_access_msg_t *msg, struct rse_pointer_access_msg_t *msg,
size_t *msg_len); size_t *msg_len);
psa_status_t rss_protocol_pointer_access_deserialize_reply(psa_outvec *out_vec, psa_status_t rse_protocol_pointer_access_deserialize_reply(psa_outvec *out_vec,
uint8_t out_len, uint8_t out_len,
psa_status_t *return_val, psa_status_t *return_val,
const struct rss_pointer_access_reply_t *reply, const struct rse_pointer_access_reply_t *reply,
size_t reply_size); size_t reply_size);
#endif /* __RSS_COMMS_PROTOCOL_POINTER_ACCESS_H__ */ #endif /* __RSE_COMMS_PROTOCOL_POINTER_ACCESS_H__ */

View file

@ -5,11 +5,11 @@
* *
*/ */
#ifndef RSS_COMMS_H #ifndef RSE_COMMS_H
#define RSS_COMMS_H #define RSE_COMMS_H
#include <stdint.h> #include <stdint.h>
int rss_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base); int rse_comms_init(uintptr_t mhu_sender_base, uintptr_t mhu_receiver_base);
#endif /* RSS_COMMS_H */ #endif /* RSE_COMMS_H */