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_utils.h b/secure_fw/services/crypto/crypto_utils.h
new file mode 100644
index 0000000..afab51e
--- /dev/null
+++ b/secure_fw/services/crypto/crypto_utils.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_CRYPTO_UTILS_H__
+#define __TFM_CRYPTO_UTILS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "tfm_secure_api.h"
+
+/**
+ * \brief Checks that a given type of access on a memory address with a
+ * a given size is allowed
+ *
+ * \param[in] addr Base address to be checked
+ * \param[in] size Size of the buffer to checked
+ * \param[in] access Type of access (1: READ ONLY, 2: READ/WRITE)
+ *
+ * \return Returns values as described in \ref tfm_crypto_err_t
+ */
+enum tfm_crypto_err_t tfm_crypto_memory_check(void *addr,
+ uint32_t size,
+ uint32_t access);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TFM_CRYPTO_UTILS_H__ */