Add platform specific TRNG driver

Adds platform specific TRNG driver to Crypto opteesp deployment.
Fetches and builds the TZ-TRNG driver from its external
repo and includes it when the crypto/opteesp is built for
the arm/fvp/fvp_base_revc-2xaemv8a platform.  Device region
information provided as external configuration data is
not yet integrated to the TRNG hardware is not yet used.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I8a2946643a279dfcc3aff608427c85e674f0e084
diff --git a/deployments/component-test/arm-linux/CMakeLists.txt b/deployments/component-test/arm-linux/CMakeLists.txt
index a0ad971..a3609d8 100644
--- a/deployments/component-test/arm-linux/CMakeLists.txt
+++ b/deployments/component-test/arm-linux/CMakeLists.txt
@@ -36,7 +36,7 @@
 	TARGET "component-test"
 	BASE_DIR ${TS_ROOT}
     COMPONENTS
-        "components/service/crypto/provider/mbedcrypto/entropy_adapter/linux"
+        "components/service/crypto/provider/mbedcrypto/trng_adapter/linux"
 )
 
 #-------------------------------------------------------------------------------
diff --git a/deployments/component-test/component-test.cmake b/deployments/component-test/component-test.cmake
index dcb0d2d..2d7c21a 100644
--- a/deployments/component-test/component-test.cmake
+++ b/deployments/component-test/component-test.cmake
@@ -20,6 +20,8 @@
 		"components/common/uuid/test"
 		"components/common/tlv"
 		"components/common/tlv/test"
+		"components/config/ramstore"
+		"components/config/ramstore/test"
 		"components/rpc/common/caller"
 		"components/rpc/common/interface"
 		"components/rpc/common/test/protocol"
diff --git a/deployments/component-test/linux-pc/CMakeLists.txt b/deployments/component-test/linux-pc/CMakeLists.txt
index a3ed949..2f0e19a 100644
--- a/deployments/component-test/linux-pc/CMakeLists.txt
+++ b/deployments/component-test/linux-pc/CMakeLists.txt
@@ -71,7 +71,7 @@
 	TARGET "component-test"
 	BASE_DIR ${TS_ROOT}
     COMPONENTS
-        "components/service/crypto/provider/mbedcrypto/entropy_adapter/linux"
+        "components/service/crypto/provider/mbedcrypto/trng_adapter/linux"
 )
 
 #-------------------------------------------------------------------------------
diff --git a/deployments/crypto/opteesp/CMakeLists.txt b/deployments/crypto/opteesp/CMakeLists.txt
index 13447b1..356d0d3 100644
--- a/deployments/crypto/opteesp/CMakeLists.txt
+++ b/deployments/crypto/opteesp/CMakeLists.txt
@@ -35,6 +35,7 @@
 	BASE_DIR ${TS_ROOT}
 	COMPONENTS
 		"components/common/tlv"
+		"components/config/ramstore"
 		"components/messaging/ffa/libsp"
 		"components/rpc/ffarpc/endpoint"
 		"components/rpc/ffarpc/caller/sp"
@@ -45,7 +46,7 @@
 		"components/service/common/serializer/protobuf"
 		"components/service/common/provider"
 		"components/service/crypto/provider/mbedcrypto"
-		"components/service/crypto/provider/mbedcrypto/entropy_adapter/platform"
+		"components/service/crypto/provider/mbedcrypto/trng_adapter/platform"
 		"components/service/crypto/provider/serializer/protobuf"
 		"components/service/crypto/provider/serializer/packed-c"
 		"components/service/secure_storage/client/psa"
@@ -66,7 +67,7 @@
 # temporarily force platform - with this change, the build interface to
 # an external builder such as a Yocto recipe is unchanged.  Should remove
 # once the build interface is published.
-set(TS_PLATFORM "ts/mock" CACHE STRING "Overridden" FORCE)
+set(TS_PLATFORM "arm/fvp/fvp_base_revc-2xaemv8a" CACHE STRING "Overridden" FORCE)
 
 add_platform(TARGET "crypto-sp")
 
diff --git a/deployments/crypto/opteesp/crypto_sp.c b/deployments/crypto/opteesp/crypto_sp.c
index 39039b3..6b376b7 100644
--- a/deployments/crypto/opteesp/crypto_sp.c
+++ b/deployments/crypto/opteesp/crypto_sp.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
  */
 
+#include <config/ramstore/config_ramstore.h>
 #include <rpc/ffarpc/caller/sp/ffarpc_caller.h>
 #include <rpc/ffarpc/endpoint/ffarpc_call_ep.h>
 #include <rpc/dummy/dummy_caller.h>
@@ -43,6 +44,10 @@
 
 	if (sp_init(&own_id) != 0) goto fatal_error;
 
+	/* Read config data */
+	config_ramstore_init();
+	// ~ read here
+
 	/* Establish RPC session with secure storage SP */
 	storage_caller = ffarpc_caller_init(&ffarpc_caller);
 
@@ -60,7 +65,7 @@
 	}
 
 	/* Initialize the crypto service */
-	crypto_iface = mbed_crypto_provider_init(&crypto_provider, storage_caller, NULL);
+	crypto_iface = mbed_crypto_provider_init(&crypto_provider, storage_caller, 0);
 
 	mbed_crypto_provider_register_serializer(&crypto_provider,
                     TS_RPC_ENCODING_PROTOBUF, pb_crypto_provider_serializer_instance());
diff --git a/deployments/libts/linux-pc/CMakeLists.txt b/deployments/libts/linux-pc/CMakeLists.txt
index ff1e139..7924f7c 100644
--- a/deployments/libts/linux-pc/CMakeLists.txt
+++ b/deployments/libts/linux-pc/CMakeLists.txt
@@ -37,7 +37,7 @@
 		"components/service/locator/standalone"
 		"components/service/locator/standalone/services/crypto"
 		"components/service/crypto/provider/mbedcrypto"
-		"components/service/crypto/provider/mbedcrypto/entropy_adapter/linux"
+		"components/service/crypto/provider/mbedcrypto/trng_adapter/linux"
 		"components/service/crypto/provider/serializer/protobuf"
 		"components/service/crypto/provider/serializer/packed-c"
 		"components/service/secure_storage/client/psa"