SPM: Deprecate customized '*_mem*' API
The 'tfm_mem*' APIs in tfm_memory_utils.h was designed for indicating
potential specific mem* implementation in secure firmware. As now the
general mem* API in string.h is callable in secure firmware, deprecate
the legacy implementation as it is unlikely to have an update.
Also limit the 'spm_mem*' API usage in platform sources, because
platform sources are shared between targets instead of being specific
for SPM.
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
Change-Id: Iea731fe14410bd7c319a378474da7b5282a28496
diff --git a/secure_fw/partitions/crypto/crypto_init.c b/secure_fw/partitions/crypto/crypto_init.c
index 00c4278..476bea5 100644
--- a/secure_fw/partitions/crypto/crypto_init.c
+++ b/secure_fw/partitions/crypto/crypto_init.c
@@ -30,10 +30,10 @@
#endif /* CRYPTO_HW_ACCELERATOR */
#ifdef TFM_PSA_API
+#include <string.h>
#include "psa/framework_feature.h"
#include "psa/service.h"
#include "psa_manifest/tfm_crypto.h"
-#include "tfm_memory_utils.h"
/**
* \brief Table containing all the Uniform Signature API exposed
@@ -152,7 +152,7 @@
static void tfm_crypto_clear_scratch(void)
{
scratch.owner = 0;
- (void)tfm_memset(scratch.buf, 0, scratch.alloc_index);
+ (void)memset(scratch.buf, 0, scratch.alloc_index);
scratch.alloc_index = 0;
}