CC3XX: Remove memory allocation functions for no_os
Removes the memory allocation functions in the no_os PAL of the CC3XX
runtime library. These functions are completely unused by the library
but just the references to malloc, realloc and free caused the libc
malloc library and its dependencies to be pulled into the binary.
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Change-Id: I413fb376248fc37273b1954630f0b9ad4f7f894b
diff --git a/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/cc_pal_mem.c b/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/cc_pal_mem.c
index b7086bf..5c57917 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/cc_pal_mem.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/pal/no_os/cc_pal_mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -126,37 +126,3 @@
{
memset(aTarget, 0x00, aSize);
}/* End of CC_PalMemSetZeroPlat */
-
-/*!
- * @brief This function purpose is to allocate a memory buffer according to aSize.
- *
- *
- * @return The function returns a pointer to allocated buffer or NULL if allocation failed.
- */
-void* CC_PalMemMallocPlat(size_t aSize /*!< [in] Number of bytes to allocate. */)
-{
- return malloc(aSize);
-}/* End of CC_PalMemMallocPlat */
-
-/*!
- * @brief This function purpose is to reallocate a memory buffer according to aNewSize.
- * The content of the old buffer is moved to the new location.
- *
- * @return The function returns a pointer to the newly allocated buffer or NULL if allocation failed.
- */
-void* CC_PalMemReallocPlat( void* aBuffer, /*!< [in] Pointer to allocated buffer. */
- size_t aNewSize /*!< [in] Number of bytes to reallocate. */)
-{
- return realloc(aBuffer, aNewSize);
-}/* End of CC_PalMemReallocPlat */
-
-/*!
- * @brief This function purpose is to free allocated buffer.
- *
- *
- * @return void.
- */
-void CC_PalMemFreePlat(void* aBuffer /*!< [in] Pointer to allocated buffer.*/)
-{
- free(aBuffer);
-}/* End of CC_PalMemFreePlat */
diff --git a/lib/ext/cryptocell-312-runtime/shared/include/pal/no_os/cc_pal_malloc_plat.h b/lib/ext/cryptocell-312-runtime/shared/include/pal/no_os/cc_pal_malloc_plat.h
index 00ab33a..61a3b96 100644
--- a/lib/ext/cryptocell-312-runtime/shared/include/pal/no_os/cc_pal_malloc_plat.h
+++ b/lib/ext/cryptocell-312-runtime/shared/include/pal/no_os/cc_pal_malloc_plat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,47 +13,13 @@
{
#endif
-#include <stdlib.h>
/**
* @brief File Description:
-* This file contains wrappers for memory operations APIs.
+* The memory allocation functions are not available with no_os.
*/
-
-/*----------------------------
- PUBLIC FUNCTIONS
------------------------------------*/
-
-/*!
- * @brief This function purpose is to allocate a memory buffer according to aSize.
- *
- *
- * @return The function returns a pointer to allocated buffer or NULL if allocation failed.
- */
-void* CC_PalMemMallocPlat(size_t aSize /*!< [in] Number of bytes to allocate. */);
-
-/*!
- * @brief This function purpose is to reallocate a memory buffer according to aNewSize.
- * The content of the old buffer is moved to the new location.
- *
- * @return The function returns a pointer to the newly allocated buffer or NULL if allocation failed.
- */
-void* CC_PalMemReallocPlat( void* aBuffer, /*!< [in] Pointer to allocated buffer. */
- size_t aNewSize /*!< [in] Number of bytes to reallocate. */);
-
-/*!
- * @brief This function purpose is to free allocated buffer.
- *
- *
- * @return void.
- */
-void CC_PalMemFreePlat(void* aBuffer /*!< [in] Pointer to allocated buffer.*/);
-
-
#ifdef __cplusplus
}
#endif
#endif
-
-