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/deployments/crypto/opteesp/crypto_sp.c b/deployments/crypto/opteesp/crypto_sp.c
index 17e9cf4..5756d1b 100644
--- a/deployments/crypto/opteesp/crypto_sp.c
+++ b/deployments/crypto/opteesp/crypto_sp.c
@@ -8,6 +8,7 @@
 #include <rpc/dummy/dummy_caller.h>
 #include <service/secure_storage/client/psa/its/its_client.h>
 #include <service/crypto/provider/mbedcrypto/crypto_provider.h>
+#include <service/crypto/provider/serializer/protobuf/pb_crypto_provider_serializer.h>
 #include <protocols/rpc/common/packed-c/status.h>
 #include <ffa_api.h>
 #include <sp_api.h>
@@ -29,7 +30,7 @@
 {
 	struct mbed_crypto_provider crypto_provider;
 	struct ffa_call_ep ffarpc_call_ep;
-	struct call_ep *crypto_ep;
+	struct rpc_interface *crypto_iface;
 	struct ffarpc_caller ffarpc_caller;
 	struct dummy_caller dummy_caller;
 	struct rpc_caller *storage_caller;
@@ -45,7 +46,7 @@
 	storage_caller = ffarpc_caller_init(&ffarpc_caller);
 
 	if (!ffarpc_caller_discover(storage_uuid, storage_sp_ids, sizeof(storage_sp_ids)/sizeof(uint16_t)) ||
-		ffarpc_caller_open(&ffarpc_caller, storage_sp_ids[0])) {
+		ffarpc_caller_open(&ffarpc_caller, storage_sp_ids[0], 0)) {
 		/*
 		 * Failed to establish session.  To allow the crypto service
 		 * to still be initialized, albeit with no persistent storage,
@@ -57,8 +58,11 @@
 	}
 
 	/* Initialize the crypto service */
-	crypto_ep = mbed_crypto_provider_init(&crypto_provider, storage_caller);
-	ffa_call_ep_init(&ffarpc_call_ep, crypto_ep);
+	crypto_iface = mbed_crypto_provider_init(&crypto_provider, storage_caller);
+    mbed_crypto_provider_register_serializer(&crypto_provider,
+                    TS_RPC_ENCODING_PROTOBUF, pb_crypto_provider_serializer_instance());
+
+	ffa_call_ep_init(&ffarpc_call_ep, crypto_iface);
 
  	/* End of boot phase */
 	ffa_msg_wait(&req_msg);