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/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());