Crypto: Add Crypto service

This change introduces the implementation of the Crypto
service based on the interface psa_crypto.h
This patch introduces changes for:

-- Secure Service, including manifest
-- Platform
-- Non-Secure interface

Change-Id: I3b68266ca80f4cd2bda2a1cd2b28b51c654b4c59
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/secure_fw/services/crypto/crypto_init.c b/secure_fw/services/crypto/crypto_init.c
new file mode 100644
index 0000000..4243466
--- /dev/null
+++ b/secure_fw/services/crypto/crypto_init.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "tfm_crypto_defs.h"
+#include "tfm_crypto_api.h"
+
+/* Pre include Mbed TLS headers */
+#define LIB_PREFIX_NAME __tfm_crypto__
+#include "mbedtls_global_symbols.h"
+
+/* Include the Mbed TLS configuration file, the way Mbed TLS does it
+ * in each of its header files.
+ */
+#if !defined(MBEDTLS_CONFIG_FILE)
+#include "platform/ext/common/tfm_mbedtls_config.h"
+#else
+#include MBEDTLS_CONFIG_FILE
+#endif
+
+#include "mbedtls/memory_buffer_alloc.h"
+
+/**
+ * \brief Buffer size used by Mbed TLS for its allocations
+ */
+#define TFM_CRYPTO_MBEDTLS_MEM_BUF_LEN (1024)
+
+/**
+ * \brief Static buffer to be used by Mbed TLS for memory allocations
+ *
+ */
+static uint8_t mbedtls_mem_buf[TFM_CRYPTO_MBEDTLS_MEM_BUF_LEN] = {0};
+
+enum tfm_crypto_err_t tfm_crypto_init(void)
+{
+    /* Initialise everything that is needed */
+
+    /* Initialise the Mbed TLS static memory allocator so that Mbed TLS
+     * allocates memory from the provided static buffer instead of from
+     * the heap.
+     */
+    mbedtls_memory_buffer_alloc_init(mbedtls_mem_buf,
+                                     TFM_CRYPTO_MBEDTLS_MEM_BUF_LEN);
+
+    return TFM_CRYPTO_ERR_PSA_SUCCESS;
+}