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_alloc.c b/secure_fw/partitions/crypto/crypto_alloc.c
index be8e83c..76fa8c2 100644
--- a/secure_fw/partitions/crypto/crypto_alloc.c
+++ b/secure_fw/partitions/crypto/crypto_alloc.c
@@ -7,12 +7,12 @@
#include <stddef.h>
#include <stdint.h>
+#include <string.h>
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
#include "tfm_crypto_defs.h"
-#include "tfm_memory_utils.h"
/**
* \def TFM_CRYPTO_CONC_OPER_NUM
@@ -79,7 +79,7 @@
}
/* Clear the contents of the backend context */
- (void)tfm_memset(mem_ptr, 0, mem_size);
+ (void)memset(mem_ptr, 0, mem_size);
}
/*!
@@ -91,7 +91,7 @@
psa_status_t tfm_crypto_init_alloc(void)
{
/* Clear the contents of the local contexts */
- (void)tfm_memset(operation, 0, sizeof(operation));
+ (void)memset(operation, 0, sizeof(operation));
return PSA_SUCCESS;
}