Core: Remove tfm_spm_signal_defs.h
Remove 'tfm_spm_signal_defs.h' which used to include the service signal
value for SPM and add the generate manifest header file to the related
file directly.
Change-Id: I49e32e3053b6e73571db5b1f07149ab2a9087d22
Signed-off-by: Edison Ai <edison.ai@arm.com>
diff --git a/secure_fw/core/ipc/include/tfm_spm_signal_defs.h b/secure_fw/core/ipc/include/tfm_spm_signal_defs.h
deleted file mode 100644
index a508691..0000000
--- a/secure_fw/core/ipc/include/tfm_spm_signal_defs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-#ifndef __TFM_SPM_SIGNAL_DEFS_H__
-#define __TFM_SPM_SIGNAL_DEFS_H__
-
-#include "test/test_services/tfm_ipc_service/tfm_ipc_service_partition.h"
-#include "test/test_services/tfm_core_test/tfm_ss_core_test_signal.h"
-#include "test/test_services/tfm_core_test_2/tfm_ss_core_test_2_signal.h"
-#include "secure_fw/services/crypto/tfm_crypto_signal.h"
-#include "test/test_services/tfm_secure_client_service/tfm_sec_client_ser_sig.h"
-#include "secure_fw/services/secure_storage/tfm_sst_signal.h"
-#include "secure_fw/services/initial_attestation/tfm_attest_signal.h"
-#include "test/test_services/tfm_ipc_client/tfm_ipc_client_partition.h"
-#include "test/test_services/tfm_irq_test_service_1/tfm_irq_test_service_1_signal.h"
-
-#endif /* __TFM_SPM_SIGNAL_DEFS_H__ */
diff --git a/secure_fw/core/ipc/tfm_spm.c b/secure_fw/core/ipc/tfm_spm.c
index 2f6598a..31e81b5 100644
--- a/secure_fw/core/ipc/tfm_spm.c
+++ b/secure_fw/core/ipc/tfm_spm.c
@@ -21,8 +21,6 @@
#include "tfm_list.h"
#include "tfm_pools.h"
#include "tfm_spm.h"
-#include "tfm_spm_signal_defs.h"
-#include "tfm_irq_signal_defs.h"
#include "tfm_thread.h"
#include "region_defs.h"
#include "tfm_nspm.h"
diff --git a/secure_fw/core/ipc/tfm_svcalls.c b/secure_fw/core/ipc/tfm_svcalls.c
index e418159..d03b7dc 100644
--- a/secure_fw/core/ipc/tfm_svcalls.c
+++ b/secure_fw/core/ipc/tfm_svcalls.c
@@ -18,7 +18,6 @@
#include "tfm_message_queue.h"
#include "tfm_spm.h"
#include "tfm_spm_hal.h"
-#include "tfm_spm_signal_defs.h"
#include "tfm_irq_list.h"
#include "tfm_api.h"
#include "tfm_secure_api.h"
diff --git a/secure_fw/services/tfm_service_list.inc b/secure_fw/services/tfm_service_list.inc
index 15b17f7..617b3ce 100644
--- a/secure_fw/services/tfm_service_list.inc
+++ b/secure_fw/services/tfm_service_list.inc
@@ -10,6 +10,18 @@
#ifndef __TFM_SERVICE_LIST_INC__
#define __TFM_SERVICE_LIST_INC__
+#include "secure_fw/services/secure_storage/psa_manifest/tfm_secure_storage.h"
+#include "secure_fw/services/audit_logging/psa_manifest/tfm_audit_logging.h"
+#include "secure_fw/services/crypto/psa_manifest/tfm_crypto.h"
+#include "secure_fw/services/platform/psa_manifest/tfm_platform.h"
+#include "secure_fw/services/initial_attestation/psa_manifest/tfm_initial_attestation.h"
+#include "test/test_services/tfm_core_test/psa_manifest/tfm_test_core.h"
+#include "test/test_services/tfm_core_test_2/psa_manifest/tfm_test_core_2.h"
+#include "test/test_services/tfm_secure_client_service/psa_manifest/tfm_test_client_service.h"
+#include "test/test_services/tfm_ipc_service/psa_manifest/tfm_ipc_service_partition.h"
+#include "test/test_services/tfm_ipc_client/psa_manifest/tfm_ipc_client_partition.h"
+#include "test/test_services/tfm_irq_test_service_1/psa_manifest/tfm_irq_test_service_1.h"
+
/******** TFM_SP_STORAGE ********/
{
"TFM_SST_SET",
diff --git a/secure_fw/services/tfm_service_list.inc.template b/secure_fw/services/tfm_service_list.inc.template
index af83a11..6d05675 100644
--- a/secure_fw/services/tfm_service_list.inc.template
+++ b/secure_fw/services/tfm_service_list.inc.template
@@ -10,6 +10,10 @@
#ifndef __TFM_SERVICE_LIST_INC__
#define __TFM_SERVICE_LIST_INC__
+{% for header in utilities.manifest_header_list %}
+#include "{{header}}"
+{% endfor %}
+
{% for manifest in manifests %}
{% if manifest.attr.tfm_partition_ipc %}
{% if manifest.manifest.services %}
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index 102ff13..2e563b1 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -84,6 +84,7 @@
env :
The instance of Environment.
"""
+ manifest_header_list = []
with open(manifest_list_yaml_file_path) as manifest_list_yaml_file:
manifest_list = yaml.load(manifest_list_yaml_file)
templatefile_name = 'secure_fw/services/manifestfilename.template'
@@ -108,6 +109,8 @@
context['file_name'] = outfile_name.replace('.h', '')
+ manifest_header_list.append(outfile_path)
+
print ("Generating " + outfile_path)
if not os.path.exists(os.path.dirname(outfile_path)):
@@ -119,7 +122,7 @@
outfile = io.open(outfile_path, "w", newline='\n')
outfile.write(template.render(context))
outfile.close()
- return
+ return manifest_header_list
def main():
"""
@@ -135,14 +138,18 @@
keep_trailing_newline = True
)
+ # Generate manifestfilename
+ manifest_header_list = generate_manifestfilename(env)
+ utilities = {}
+ context = {}
+
with open(manifest_list_yaml_file_path) as manifest_list_yaml_file:
# Read manifest list file, build database
db = load_manifest_list(manifest_list_yaml_file)
- utilities = {}
utilities['donotedit_warning']=donotedit_warning
+ utilities['manifest_header_list']=manifest_header_list
- context = {}
context['manifests'] = db
context['utilities'] = utilities
@@ -163,9 +170,6 @@
outfile.write(template.render(context))
outfile.close()
- # Generate manifestfilename
- generate_manifestfilename(env)
-
print ("Generation of files done")
if __name__ == "__main__":