aboutsummaryrefslogtreecommitdiff
path: root/components/rpc/ffarpc/endpoint/ffarpc_call_args.h
diff options
context:
space:
mode:
authorjulhal01 <julian.hall@arm.com>2020-12-15 13:39:01 +0000
committerGyorgy Szing <Gyorgy.Szing@arm.com>2021-04-14 16:59:03 +0200
commitc3f4e9a7550ee4fddf2d24127ef33ca514351806 (patch)
treee61b25f7a93ea4ed2f26363186cc236aba06dd24 /components/rpc/ffarpc/endpoint/ffarpc_call_args.h
parent35c6d643b5f0c0387702e22bf742dd4878ca5ddd (diff)
downloadtrusted-services-c3f4e9a7550ee4fddf2d24127ef33ca514351806.tar.gz
Extend RPC parameters
The RPC model is extended to include parameters for identifying an RPC interface instance at an endpoint and another for identifying the parameter encoding. The interface ID parameter allows multiple service interfaces to be co-located. The encoding parameter allows clients to use different parameter serialization schemes and to specify the format in each RPC request. Signed-off-by: julhal01 <julian.hall@arm.com> Change-Id: I201b3417dc0e9f655113b9931db3494e41f1d74b
Diffstat (limited to 'components/rpc/ffarpc/endpoint/ffarpc_call_args.h')
-rw-r--r--components/rpc/ffarpc/endpoint/ffarpc_call_args.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/components/rpc/ffarpc/endpoint/ffarpc_call_args.h b/components/rpc/ffarpc/endpoint/ffarpc_call_args.h
index 402e4f5d3..fbe7320be 100644
--- a/components/rpc/ffarpc/endpoint/ffarpc_call_args.h
+++ b/components/rpc/ffarpc/endpoint/ffarpc_call_args.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,11 +17,21 @@ extern "C" {
* normal world RPC caller and the RPC listener in the SP.
*/
+/* Macros for parameters carried in a single register */
+#define FFA_CALL_ARGS_COMBINE_IFACE_ID_OPCODE(i, o) \
+ (((i) << 16) | ((o) & 0xffff))
+#define FFA_CALL_ARGS_EXTRACT_IFACE(reg) \
+ ((reg) >> 16)
+#define FFA_CALL_ARGS_EXTRACT_OPCODE(reg) \
+ ((reg) & 0xffff)
+
/* Common req & resp arg offests into msg_args structure */
-#define FFA_CALL_ARGS_OPCODE (0)
+#define FFA_CALL_ARGS_IFACE_ID_OPCODE (0)
/* Req arg offsets */
#define FFA_CALL_ARGS_REQ_DATA_LEN (1)
+#define FFA_CALL_ARGS_CALLER_ID (2)
+#define FFA_CALL_ARGS_ENCODING (3)
/* Resp arg offsets */
#define FFA_CALL_ARGS_RESP_DATA_LEN (1)