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
diff --git a/components/rpc/common/interface/rpc_caller.h b/components/rpc/common/interface/rpc_caller.h
index a75bdd9..879d2cb 100644
--- a/components/rpc/common/interface/rpc_caller.h
+++ b/components/rpc/common/interface/rpc_caller.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
  */
@@ -36,6 +36,7 @@
 struct rpc_caller
 {
 	void *context;
+	uint32_t encoding;
 
 	/* A concrete rpc_caller implements these methods */
 	rpc_call_handle (*call_begin)(void *context, uint8_t **req_buf, size_t req_len);
@@ -47,6 +48,19 @@
 };
 
 /*
+ * Called by a concrete rpc_caller to initialise the base rpc_caller.
+ */
+void rpc_caller_init(struct rpc_caller *s, void *context);
+
+/*
+ * Allows a client to specify the parameter encoding scheme that the client
+ * intends to use during an RPC session.  It is the client's responsiblity
+ * to choose an encoding scheme that is supported by the remote interface.
+ */
+RPC_CALLER_EXPORTED void rpc_caller_set_encoding_scheme(struct rpc_caller *s,
+			uint32_t encoding);
+
+/*
  * Starts a call transaction. The returned handle is an identifier for the
  * transaction and must be passed as a parameter to call_invoke() and
  * call_end(). A concrete rpc_caller may perform resource allocation during