SPRT: Rename the folder name to 'runtime'
The original name 'sprt' can be confusing if user did not read
SPRTL related document, hence rename it as 'runtime' to
indicate it is a secure partition runtime API set.
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
Change-Id: I3ba7d5e80dd2ee32d52463bcdf012a2f5bf6017c
diff --git a/secure_fw/partitions/lib/sprt/CMakeLists.txt b/secure_fw/partitions/lib/runtime/CMakeLists.txt
similarity index 97%
rename from secure_fw/partitions/lib/sprt/CMakeLists.txt
rename to secure_fw/partitions/lib/runtime/CMakeLists.txt
index fede342..395045e 100644
--- a/secure_fw/partitions/lib/sprt/CMakeLists.txt
+++ b/secure_fw/partitions/lib/runtime/CMakeLists.txt
@@ -24,7 +24,7 @@
${CMAKE_SOURCE_DIR}/secure_fw/shared/crt_memcpy.c
${CMAKE_SOURCE_DIR}/secure_fw/shared/crt_memset.c
$<$<BOOL:${CONFIG_TFM_PARTITION_META}>:./sprt_partition_metadata_indicator.c>
- $<$<BOOL:${CONFIG_TFM_PARTITION_META}>:./sprt_main.c>
+ $<$<BOOL:${CONFIG_TFM_PARTITION_META}>:./rt_main.c>
$<$<BOOL:${CONFIG_TFM_SPM_BACKEND_IPC}>:./sfn_common_thread.c>
)
diff --git a/secure_fw/partitions/lib/sprt/crt_memcmp.c b/secure_fw/partitions/lib/runtime/crt_memcmp.c
similarity index 99%
rename from secure_fw/partitions/lib/sprt/crt_memcmp.c
rename to secure_fw/partitions/lib/runtime/crt_memcmp.c
index 0370ff0..da17839 100644
--- a/secure_fw/partitions/lib/sprt/crt_memcmp.c
+++ b/secure_fw/partitions/lib/runtime/crt_memcmp.c
@@ -13,6 +13,7 @@
int result = 0;
const uint8_t *p1 = (const uint8_t *)s1;
const uint8_t *p2 = (const uint8_t *)s2;
+
while (n--) {
if ((*p1 != *p2) && (result == 0)) {
result = *p1 - *p2;
diff --git a/secure_fw/partitions/lib/sprt/crt_memmove.c b/secure_fw/partitions/lib/runtime/crt_memmove.c
similarity index 100%
rename from secure_fw/partitions/lib/sprt/crt_memmove.c
rename to secure_fw/partitions/lib/runtime/crt_memmove.c
diff --git a/secure_fw/partitions/lib/sprt/crt_strnlen.c b/secure_fw/partitions/lib/runtime/crt_strnlen.c
similarity index 100%
rename from secure_fw/partitions/lib/sprt/crt_strnlen.c
rename to secure_fw/partitions/lib/runtime/crt_strnlen.c
diff --git a/secure_fw/partitions/lib/sprt/include/sprt_main.h b/secure_fw/partitions/lib/runtime/include/rt_main.h
similarity index 70%
rename from secure_fw/partitions/lib/sprt/include/sprt_main.h
rename to secure_fw/partitions/lib/runtime/include/rt_main.h
index eee88cb..22169ce 100644
--- a/secure_fw/partitions/lib/sprt/include/sprt_main.h
+++ b/secure_fw/partitions/lib/runtime/include/rt_main.h
@@ -5,10 +5,10 @@
*
*/
-#ifndef __SPRT_MAIN_H__
-#define __SPRT_MAIN_H__
+#ifndef __RT_MAIN_H__
+#define __RT_MAIN_H__
/* Common partition runtime entry - 'sprt_main' */
void sprt_main(void);
-#endif /* __SPRT_MAIN_H__ */
+#endif /* __RT_MAIN_H__ */
diff --git a/secure_fw/partitions/lib/sprt/include/service_api.h b/secure_fw/partitions/lib/runtime/include/service_api.h
similarity index 100%
rename from secure_fw/partitions/lib/sprt/include/service_api.h
rename to secure_fw/partitions/lib/runtime/include/service_api.h
diff --git a/secure_fw/partitions/lib/sprt/include/tfm_sp_log.h b/secure_fw/partitions/lib/runtime/include/tfm_sp_log.h
similarity index 94%
rename from secure_fw/partitions/lib/sprt/include/tfm_sp_log.h
rename to secure_fw/partitions/lib/runtime/include/tfm_sp_log.h
index 576c0e8..bf2f67d 100644
--- a/secure_fw/partitions/lib/sprt/include/tfm_sp_log.h
+++ b/secure_fw/partitions/lib/runtime/include/tfm_sp_log.h
@@ -27,8 +27,8 @@
#error "TFM_PARTITION_LOG_LEVEL not defined!"
#endif
-#if (TFM_PARTITION_LOG_LEVEL > TFM_PARTITION_LOG_LEVEL_DEBUG || \
- TFM_PARTITION_LOG_LEVEL < TFM_PARTITION_LOG_LEVEL_SILENCE)
+#if (TFM_PARTITION_LOG_LEVEL > TFM_PARTITION_LOG_LEVEL_DEBUG) || \
+ (TFM_PARTITION_LOG_LEVEL < TFM_PARTITION_LOG_LEVEL_SILENCE)
#error "Incorrect TFM_PARTITION_LOG_LEVEL value!"
#endif
diff --git a/secure_fw/partitions/lib/sprt/include/tfm_strnlen.h b/secure_fw/partitions/lib/runtime/include/tfm_strnlen.h
similarity index 100%
rename from secure_fw/partitions/lib/sprt/include/tfm_strnlen.h
rename to secure_fw/partitions/lib/runtime/include/tfm_strnlen.h
diff --git a/secure_fw/partitions/lib/sprt/sprt_main.c b/secure_fw/partitions/lib/runtime/rt_main.c
similarity index 96%
rename from secure_fw/partitions/lib/sprt/sprt_main.c
rename to secure_fw/partitions/lib/runtime/rt_main.c
index caa5cd8..e9ad7be 100644
--- a/secure_fw/partitions/lib/sprt/sprt_main.c
+++ b/secure_fw/partitions/lib/runtime/rt_main.c
@@ -8,7 +8,7 @@
#include "compiler_ext_defs.h"
#include "runtime_defs.h"
#include "sprt_partition_metadata_indicator.h"
-#include "sprt_main.h"
+#include "rt_main.h"
extern void common_sfn_thread(void);
diff --git a/secure_fw/partitions/lib/sprt/service_api.c b/secure_fw/partitions/lib/runtime/service_api.c
similarity index 100%
rename from secure_fw/partitions/lib/sprt/service_api.c
rename to secure_fw/partitions/lib/runtime/service_api.c
diff --git a/secure_fw/partitions/lib/sprt/sfn_common_thread.c b/secure_fw/partitions/lib/runtime/sfn_common_thread.c
similarity index 100%
rename from secure_fw/partitions/lib/sprt/sfn_common_thread.c
rename to secure_fw/partitions/lib/runtime/sfn_common_thread.c
diff --git a/secure_fw/partitions/lib/sprt/sprt_partition_metadata_indicator.c b/secure_fw/partitions/lib/runtime/sprt_partition_metadata_indicator.c
similarity index 100%
rename from secure_fw/partitions/lib/sprt/sprt_partition_metadata_indicator.c
rename to secure_fw/partitions/lib/runtime/sprt_partition_metadata_indicator.c
diff --git a/secure_fw/partitions/lib/sprt/sprt_partition_metadata_indicator.h b/secure_fw/partitions/lib/runtime/sprt_partition_metadata_indicator.h
similarity index 100%
rename from secure_fw/partitions/lib/sprt/sprt_partition_metadata_indicator.h
rename to secure_fw/partitions/lib/runtime/sprt_partition_metadata_indicator.h
diff --git a/secure_fw/partitions/lib/sprt/tfm_sp_log_raw.c b/secure_fw/partitions/lib/runtime/tfm_sp_log_raw.c
similarity index 99%
rename from secure_fw/partitions/lib/sprt/tfm_sp_log_raw.c
rename to secure_fw/partitions/lib/runtime/tfm_sp_log_raw.c
index bf39b3d..8a8d462 100644
--- a/secure_fw/partitions/lib/sprt/tfm_sp_log_raw.c
+++ b/secure_fw/partitions/lib/runtime/tfm_sp_log_raw.c
@@ -102,7 +102,7 @@
outputbuf.pos = 0;
- if(fmt == NULL) {
+ if (fmt == NULL) {
return TFM_HAL_ERROR_INVALID_INPUT;
}