aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Peng <kevin.peng@arm.com>2020-12-31 10:22:59 +0800
committerKen Liu <ken.liu@arm.com>2021-01-26 04:08:54 +0000
commit578a8492155aa44b6b15307f14d903dc0f011cc6 (patch)
tree31e9ebdddb5b178b62282c66aa90f4c66f2126fd
parent55ba01f19b5a2eada89558a22d8b7ad02aaa8017 (diff)
downloadtrusted-firmware-m-578a8492155aa44b6b15307f14d903dc0f011cc6.tar.gz
Tools: Naming refine: manifest -> partition
The "manifest.manifest" in template is confusing. It should be "partition.manifest" instead. This patch does this change to make the templates much more easy to read and understand. Also updates the obsolete example code in the document. Change-Id: Iac0328f353267342187707c405eea57721209443 Signed-off-by: Kevin Peng <kevin.peng@arm.com>
-rw-r--r--docs/design_documents/tfm_code_generation_with_jinja2.rst20
-rw-r--r--interface/include/psa_manifest/pid.h.template12
-rw-r--r--interface/include/psa_manifest/sid.h.template12
-rw-r--r--interface/include/tfm_veneers.h.template16
-rw-r--r--platform/ext/common/armclang/tfm_isolation_l3.sct.template108
-rw-r--r--platform/ext/common/gcc/tfm_isolation_l3.ld.template190
-rw-r--r--secure_fw/partitions/tfm_service_list.inc.template48
-rw-r--r--secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc.template60
-rw-r--r--secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template156
-rw-r--r--secure_fw/spm/cmsis_func/tfm_veneers.c.template32
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template46
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template166
-rw-r--r--tools/tfm_parse_manifest_list.py14
13 files changed, 437 insertions, 443 deletions
diff --git a/docs/design_documents/tfm_code_generation_with_jinja2.rst b/docs/design_documents/tfm_code_generation_with_jinja2.rst
index 8a0317de65..2e730238db 100644
--- a/docs/design_documents/tfm_code_generation_with_jinja2.rst
+++ b/docs/design_documents/tfm_code_generation_with_jinja2.rst
@@ -62,22 +62,16 @@ Improvements over the current solution
Example
*******
-Below code snippet enumerates the secure function IDs:
+Below code snippet enumerates services in Secure Partitions:
.. code-block::
- {% for manifest in manifests %}
- {% if manifest.attr.conditional %}
- #ifdef {{manifest.attr.conditional}}
+ {% for partition in partitions %}
+ {% if partition.manifest.services %}
+ {% for service in partition.manifest.services %}
+ {do something for the service}
+ {% endfor %}
{% endif %}
- /******** {{manifest.manifest.tfm_partition_name}} ********/
- {% for sec_func in manifest.manifest.secure_functions %}
- {{'{'}}{{sec_func.tfm_symbol}}, {{sec_func.sfid}}{{'}'}},
- {% endfor %}
- {% if manifest.attr.conditional %}
- #endif /* {{manifest.attr.conditional}} */
- {% endif %}
-
{% endfor %}
-*Copyright (c) 2019-2020, Arm Limited. All rights reserved.*
+*Copyright (c) 2019-2021, Arm Limited. All rights reserved.*
diff --git a/interface/include/psa_manifest/pid.h.template b/interface/include/psa_manifest/pid.h.template
index 6670401967..223ab78fe1 100644
--- a/interface/include/psa_manifest/pid.h.template
+++ b/interface/include/psa_manifest/pid.h.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -14,15 +14,15 @@
extern "C" {
#endif
-{% for manifest in manifests %}
- {% if manifest.attr.pid - 256 < 0 %}
-#error "Partition ID for '{{manifest.manifest.name}}' have to be at least TFM_SP_BASE"
+{% for partition in partitions %}
+ {% if partition.attr.pid - 256 < 0 %}
+#error "Partition ID for '{{partition.manifest.name}}' have to be at least TFM_SP_BASE"
{% else %}
-#define {{"%-62s"|format(manifest.manifest.name)}} ({{manifest.attr.pid}})
+#define {{"%-62s"|format(partition.manifest.name)}} ({{partition.attr.pid}})
{% endif %}
{% endfor %}
-#define {{"%-62s"|format("TFM_MAX_USER_PARTITIONS")}} ({{manifests | length()}})
+#define {{"%-62s"|format("TFM_MAX_USER_PARTITIONS")}} ({{partitions | length()}})
#ifdef __cplusplus
}
diff --git a/interface/include/psa_manifest/sid.h.template b/interface/include/psa_manifest/sid.h.template
index f25a1ca2fa..5bbacd2c7d 100644
--- a/interface/include/psa_manifest/sid.h.template
+++ b/interface/include/psa_manifest/sid.h.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -14,11 +14,11 @@
extern "C" {
#endif
-{% for manifest in manifests %}
- {% if manifest.attr.tfm_partition_ipc %}
-/******** {{manifest.manifest.name}} ********/
- {% if manifest.manifest.services %}
- {% for service in manifest.manifest.services %}
+{% for partition in partitions %}
+ {% if partition.attr.tfm_partition_ipc %}
+/******** {{partition.manifest.name}} ********/
+ {% if partition.manifest.services %}
+ {% for service in partition.manifest.services %}
{% set str = service.name + "_SID" %}
#define {{"%-58s"|format(str)}} ({{"%10s"|format(service.sid)}}U)
{% set str = service.name + "_VERSION" %}
diff --git a/interface/include/tfm_veneers.h.template b/interface/include/tfm_veneers.h.template
index 83012f7ae3..502dee28ae 100644
--- a/interface/include/tfm_veneers.h.template
+++ b/interface/include/tfm_veneers.h.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -16,16 +16,16 @@
extern "C" {
#endif
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-/******** {{manifest.manifest.name}} ********/
- {% for function in manifest.manifest.secure_functions%}
+/******** {{partition.manifest.name}} ********/
+ {% for function in partition.manifest.secure_functions%}
psa_status_t tfm_{{function.signal.lower()}}_veneer(psa_invec *in_vec, size_t in_len, psa_outvec *out_vec, size_t out_len);
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
diff --git a/platform/ext/common/armclang/tfm_isolation_l3.sct.template b/platform/ext/common/armclang/tfm_isolation_l3.sct.template
index 13c3a4313f..cb108df6f4 100644
--- a/platform/ext/common/armclang/tfm_isolation_l3.sct.template
+++ b/platform/ext/common/armclang/tfm_isolation_l3.sct.template
@@ -41,26 +41,26 @@ LR_CODE S_CODE_START {
}
/**** PSA RoT CODE + RO-data starts here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'PSA-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'PSA-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- ER_{{manifest.manifest.name}}_RO +0 ALIGN 32 {
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ ER_{{partition.manifest.name}}_RO +0 ALIGN 32 {
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}} (+RO)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}} (+RO)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_FN)
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_FN)
}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -68,26 +68,26 @@ LR_CODE S_CODE_START {
/**** PSA RoT CODE + RO-data ends here */
/**** APPLICATION RoT CODE + RO-data starts here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'APPLICATION-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'APPLICATION-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- ER_{{manifest.manifest.name}}_RO +0 ALIGN 32 {
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ ER_{{partition.manifest.name}}_RO +0 ALIGN 32 {
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}} (+RO)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}} (+RO)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_APP-ROT_ATTR_FN)
+ *({{partition.manifest.name}}_APP-ROT_ATTR_FN)
}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -133,37 +133,37 @@ LR_CODE S_CODE_START {
}
/**** PSA RoT RWZI starts here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'PSA-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'PSA-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- PT_{{manifest.manifest.name}}_PRIVATE_DATA_START +0 ALIGN 32 {
+ PT_{{partition.manifest.name}}_PRIVATE_DATA_START +0 ALIGN 32 {
/* Position tag */
}
- ER_{{manifest.manifest.name}}_RWZI +0 ALIGN 32 {
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ ER_{{partition.manifest.name}}_RWZI +0 ALIGN 32 {
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}} (+RW +ZI)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}} (+RW +ZI)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_RW)
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_ZI)
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_RW)
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_ZI)
}
- PT_{{manifest.manifest.name}}_PRIVATE_DATA_END +0 ALIGN 32 {
+ PT_{{partition.manifest.name}}_PRIVATE_DATA_END +0 ALIGN 32 {
/* Position tag */
}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -178,37 +178,37 @@ LR_CODE S_CODE_START {
ARM_LIB_STACK +0 ALIGN 32 EMPTY S_PSP_STACK_SIZE {
}
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'APPLICATION-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'APPLICATION-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- PT_{{manifest.manifest.name}}_PRIVATE_DATA_START +0 ALIGN 32 {
+ PT_{{partition.manifest.name}}_PRIVATE_DATA_START +0 ALIGN 32 {
/* Position tag */
}
- ER_{{manifest.manifest.name}}_RWZI +0 ALIGN 32 {
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ ER_{{partition.manifest.name}}_RWZI +0 ALIGN 32 {
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}} (+RW +ZI)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}} (+RW +ZI)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_APP-ROT_ATTR_RW)
- *({{manifest.manifest.name}}_APP-ROT_ATTR_ZI)
+ *({{partition.manifest.name}}_APP-ROT_ATTR_RW)
+ *({{partition.manifest.name}}_APP-ROT_ATTR_ZI)
}
- PT_{{manifest.manifest.name}}_PRIVATE_DATA_END +0 ALIGN 32 {
+ PT_{{partition.manifest.name}}_PRIVATE_DATA_END +0 ALIGN 32 {
/* Position tag */
}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
diff --git a/platform/ext/common/gcc/tfm_isolation_l3.ld.template b/platform/ext/common/gcc/tfm_isolation_l3.ld.template
index e0743334c8..493870eb25 100644
--- a/platform/ext/common/gcc/tfm_isolation_l3.ld.template
+++ b/platform/ext/common/gcc/tfm_isolation_l3.ld.template
@@ -60,15 +60,15 @@ SECTIONS
LONG (LOADADDR(.TFM_DATA))
LONG (ADDR(.TFM_DATA))
LONG (SIZEOF(.TFM_DATA))
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- LONG (LOADADDR(.ER_{{manifest.manifest.name}}_RWZI))
- LONG (ADDR(.ER_{{manifest.manifest.name}}_RWZI))
- LONG (SIZEOF(.ER_{{manifest.manifest.name}}_RWZI))
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ LONG (LOADADDR(.ER_{{partition.manifest.name}}_RWZI))
+ LONG (ADDR(.ER_{{partition.manifest.name}}_RWZI))
+ LONG (SIZEOF(.ER_{{partition.manifest.name}}_RWZI))
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
#if defined(S_CODE_SRAM_ALIAS_BASE)
@@ -84,14 +84,14 @@ SECTIONS
__zero_table_start__ = .;
LONG (ADDR(.TFM_BSS))
LONG (SIZEOF(.TFM_BSS))
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- LONG (ADDR(.{{manifest.manifest.name}}_RWZI_BSS))
- LONG (SIZEOF(.{{manifest.manifest.name}}_RWZI_BSS))
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ LONG (ADDR(.{{partition.manifest.name}}_RWZI_BSS))
+ LONG (SIZEOF(.{{partition.manifest.name}}_RWZI_BSS))
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
__zero_table_end__ = .;
@@ -102,32 +102,32 @@ SECTIONS
Image$$PT_RO_START$$Base = .;
/**** PSA RoT RO CODE + RO-data starts here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'PSA-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'PSA-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- .{{manifest.manifest.name}}_RO : ALIGN(32)
+ .{{partition.manifest.name}}_RO : ALIGN(32)
{
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.text*)
{{pattern}}:*(.rodata*)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.text*)
{{pattern}}:*(.rodata*)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_FN)
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_FN)
. = ALIGN(32);
} > FLASH
- Image$${{manifest.manifest.name}}_RO$$Base = ADDR(.{{manifest.manifest.name}}_RO);
- Image$${{manifest.manifest.name}}_RO$$Limit = ADDR(.{{manifest.manifest.name}}_RO) + SIZEOF(.{{manifest.manifest.name}}_RO);
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ Image$${{partition.manifest.name}}_RO$$Base = ADDR(.{{partition.manifest.name}}_RO);
+ Image$${{partition.manifest.name}}_RO$$Limit = ADDR(.{{partition.manifest.name}}_RO) + SIZEOF(.{{partition.manifest.name}}_RO);
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -135,32 +135,32 @@ SECTIONS
/**** PSA RoT RO CODE + data ends here */
/**** APPLICATION RoT RO CODE + data starts here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'APPLICATION-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'APPLICATION-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- .{{manifest.manifest.name}}_RO : ALIGN(32)
+ .{{partition.manifest.name}}_RO : ALIGN(32)
{
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.text*)
{{pattern}}:*(.rodata*)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.text*)
{{pattern}}:*(.rodata*)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_APP-ROT_ATTR_FN)
+ *({{partition.manifest.name}}_APP-ROT_ATTR_FN)
. = ALIGN(32);
} > FLASH
- Image$${{manifest.manifest.name}}_CODE$$Base = ADDR(.{{manifest.manifest.name}}_RO);
- Image$${{manifest.manifest.name}}_CODE$$Limit = ADDR(.{{manifest.manifest.name}}_RO) + SIZEOF(.{{manifest.manifest.name}}_RO);
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ Image$${{partition.manifest.name}}_CODE$$Base = ADDR(.{{partition.manifest.name}}_RO);
+ Image$${{partition.manifest.name}}_CODE$$Limit = ADDR(.{{partition.manifest.name}}_RO) + SIZEOF(.{{partition.manifest.name}}_RO);
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -271,62 +271,62 @@ SECTIONS
Image$$ARM_LIB_STACK_MSP$$ZI$$Limit = ADDR(.msp_stack) + SIZEOF(.msp_stack);
/**** PSA RoT DATA start here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'PSA-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'PSA-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
/* Position tag */
. = ALIGN(32);
- Image$$PT_{{manifest.manifest.name}}_PRIVATE_DATA_START$$Base = .;
+ Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_START$$Base = .;
- .ER_{{manifest.manifest.name}}_RWZI : ALIGN(32)
+ .ER_{{partition.manifest.name}}_RWZI : ALIGN(32)
{
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.data*)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.data*)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_RW)
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_RW)
. = ALIGN(32);
} > RAM AT> FLASH
- Image$$ER_{{manifest.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{manifest.manifest.name}}_RWZI);
- Image$$ER_{{manifest.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{manifest.manifest.name}}_RWZI) + SIZEOF(.ER_{{manifest.manifest.name}}_RWZI);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{partition.manifest.name}}_RWZI);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{partition.manifest.name}}_RWZI) + SIZEOF(.ER_{{partition.manifest.name}}_RWZI);
- .{{manifest.manifest.name}}_RWZI_BSS : ALIGN(32)
+ .{{partition.manifest.name}}_RWZI_BSS : ALIGN(32)
{
- start_of_{{manifest.manifest.name}}_RWZI = .;
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ start_of_{{partition.manifest.name}}_RWZI = .;
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.bss*)
{{pattern}}:*(COMMON)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.bss*)
{{pattern}}(COMMON)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_PSA-ROT_ATTR_ZI)
- . += (. - start_of_{{manifest.manifest.name}}_RWZI) ? 0 : 4;
+ *({{partition.manifest.name}}_PSA-ROT_ATTR_ZI)
+ . += (. - start_of_{{partition.manifest.name}}_RWZI) ? 0 : 4;
. = ALIGN(32);
} > RAM AT> RAM
- Image$$ER_{{manifest.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{manifest.manifest.name}}_RWZI_BSS);
- Image$$ER_{{manifest.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{manifest.manifest.name}}_RWZI_BSS) + SIZEOF(.{{manifest.manifest.name}}_RWZI_BSS);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{partition.manifest.name}}_RWZI_BSS);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{partition.manifest.name}}_RWZI_BSS) + SIZEOF(.{{partition.manifest.name}}_RWZI_BSS);
/* Position tag */
. = ALIGN(32);
- Image$$PT_{{manifest.manifest.name}}_PRIVATE_DATA_END$$Base = .;
+ Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_END$$Base = .;
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -346,62 +346,62 @@ SECTIONS
Image$$ARM_LIB_STACK$$ZI$$Limit = ADDR(.psp_stack) + SIZEOF(.psp_stack);
/**** APPLICATION RoT DATA start here */
-{% for manifest in manifests %}
- {% if manifest.manifest.type == 'APPLICATION-ROT' %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.type == 'APPLICATION-ROT' %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
/* Position tag */
. = ALIGN(32);
- Image$$PT_{{manifest.manifest.name}}_PRIVATE_DATA_START$$Base = .;
+ Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_START$$Base = .;
- .ER_{{manifest.manifest.name}}_RWZI : ALIGN(32)
+ .ER_{{partition.manifest.name}}_RWZI : ALIGN(32)
{
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.data*)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.data*)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_APP-ROT_ATTR_RW)
+ *({{partition.manifest.name}}_APP-ROT_ATTR_RW)
. = ALIGN(32);
} > RAM AT> FLASH
- Image$$.ER_{{manifest.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{manifest.manifest.name}}_RWZI);
- Image$$.ER_{{manifest.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{manifest.manifest.name}}_RWZI) + SIZEOF(.ER_{{manifest.manifest.name}}_RWZI);
+ Image$$.ER_{{partition.manifest.name}}_RWZI$$RW$$Base = ADDR(.ER_{{partition.manifest.name}}_RWZI);
+ Image$$.ER_{{partition.manifest.name}}_RWZI$$RW$$Limit = ADDR(.ER_{{partition.manifest.name}}_RWZI) + SIZEOF(.ER_{{partition.manifest.name}}_RWZI);
- .{{manifest.manifest.name}}_RWZI_BSS : ALIGN(32)
+ .{{partition.manifest.name}}_RWZI_BSS : ALIGN(32)
{
- start_of_{{manifest.manifest.name}}_RWZI = .;
- {% if manifest.attr.linker_pattern.library_list %}
- {% for pattern in manifest.attr.linker_pattern.library_list %}
+ start_of_{{partition.manifest.name}}_RWZI = .;
+ {% if partition.attr.linker_pattern.library_list %}
+ {% for pattern in partition.attr.linker_pattern.library_list %}
{{pattern}}:*(.bss*)
{{pattern}}:*(COMMON)
{% endfor %}
{% endif %}
- {% if manifest.attr.linker_pattern.object_list %}
- {% for pattern in manifest.attr.linker_pattern.object_list %}
+ {% if partition.attr.linker_pattern.object_list %}
+ {% for pattern in partition.attr.linker_pattern.object_list %}
{{pattern}}(.bss*)
{{pattern}}(COMMON)
{% endfor %}
{% endif %}
- *({{manifest.manifest.name}}_APP-ROT_ATTR_ZI)
- . += (. - start_of_{{manifest.manifest.name}}_RWZI) ? 0 : 4;
+ *({{partition.manifest.name}}_APP-ROT_ATTR_ZI)
+ . += (. - start_of_{{partition.manifest.name}}_RWZI) ? 0 : 4;
. = ALIGN(32);
} > RAM AT> RAM
- Image$$ER_{{manifest.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{manifest.manifest.name}}_RWZI_BSS);
- Image$$ER_{{manifest.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{manifest.manifest.name}}_RWZI_BSS) + SIZEOF(.{{manifest.manifest.name}}_RWZI_BSS);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Base = ADDR(.{{partition.manifest.name}}_RWZI_BSS);
+ Image$$ER_{{partition.manifest.name}}_RWZI$$ZI$$Limit = ADDR(.{{partition.manifest.name}}_RWZI_BSS) + SIZEOF(.{{partition.manifest.name}}_RWZI_BSS);
/* Position tag */
. = ALIGN(32);
- Image$$PT_{{manifest.manifest.name}}_PRIVATE_DATA_END$$Base = .;
+ Image$$PT_{{partition.manifest.name}}_PRIVATE_DATA_END$$Base = .;
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
diff --git a/secure_fw/partitions/tfm_service_list.inc.template b/secure_fw/partitions/tfm_service_list.inc.template
index a16e066adb..e2e3f8df85 100644
--- a/secure_fw/partitions/tfm_service_list.inc.template
+++ b/secure_fw/partitions/tfm_service_list.inc.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -10,26 +10,26 @@
#ifndef __TFM_SERVICE_LIST_INC__
#define __TFM_SERVICE_LIST_INC__
-{% for manifest in manifests %}
-#ifdef {{manifest.attr.conditional}}
-#include "{{manifest.header_file}}"
-#endif /* {{manifest.attr.conditional}} */
+{% for partition in partitions %}
+#ifdef {{partition.attr.conditional}}
+#include "{{partition.header_file}}"
+#endif /* {{partition.attr.conditional}} */
{% endfor %}
const struct tfm_spm_service_db_t service_db[] =
{
-{% for manifest in manifests %}
- {% if manifest.attr.tfm_partition_ipc %}
- {% if manifest.manifest.services %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.tfm_partition_ipc %}
+ {% if partition.manifest.services %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- /******** {{manifest.manifest.name}} ********/
- {% for service in manifest.manifest.services %}
+ /******** {{partition.manifest.name}} ********/
+ {% for service in partition.manifest.services %}
{{'{'}}
.name = "{{service.name}}",
- .partition_id = {{manifest.manifest.name}},
+ .partition_id = {{partition.manifest.name}},
.signal = {{service.name}}_SIGNAL,
.sid = {{service.sid}},
{% if service.non_secure_clients is sameas true %}
@@ -49,8 +49,8 @@ const struct tfm_spm_service_db_t service_db[] =
{% endif %}
{{'}'}},
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -63,14 +63,14 @@ const struct tfm_spm_service_db_t service_db[] =
/**************************************************************************/
struct tfm_spm_service_t service[] =
{
-{% for manifest in manifests %}
- {% if manifest.attr.tfm_partition_ipc %}
- {% if manifest.manifest.services %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.tfm_partition_ipc %}
+ {% if partition.manifest.services %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- /******** {{manifest.manifest.name}} ********/
- {% for service in manifest.manifest.services %}
+ /******** {{partition.manifest.name}} ********/
+ {% for service in partition.manifest.services %}
{{'{'}}
.service_db = NULL,
.partition = NULL,
@@ -78,8 +78,8 @@ struct tfm_spm_service_t service[] =
.list = {0},
{{'}'}},
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
diff --git a/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc.template b/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc.template
index e03166985f..522886bcce 100644
--- a/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc.template
+++ b/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc.template
@@ -7,10 +7,10 @@
{{utilities.donotedit_warning}}
-{% for manifest in manifests %}
-#ifdef {{manifest.attr.conditional}}
-#include "{{manifest.header_file}}"
-#endif /* {{manifest.attr.conditional}} */
+{% for partition in partitions %}
+#ifdef {{partition.attr.conditional}}
+#include "{{partition.header_file}}"
+#endif /* {{partition.attr.conditional}} */
{% endfor %}
#include "psa_manifest/pid.h"
{% macro _irq_record(partition_name, signal, line, priority) -%}
@@ -19,27 +19,27 @@
/* Definitions of the signals of the IRQs */
const struct tfm_core_irq_signal_data_t tfm_core_irq_signals[] = {
-{% for manifest in manifests %}
- {% if manifest.manifest.irqs %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.irqs %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% for handler in manifest.manifest.irqs %}
+ {% for handler in partition.manifest.irqs %}
{% set irq_data = namespace() %}
{% if handler.source %}
{% set irq_data.line = handler.source %}
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
{% if handler.tfm_irq_priority %}
{% set irq_data.priority = handler.tfm_irq_priority %}
{% else %}
{% set irq_data.priority = "TFM_DEFAULT_SECURE_IRQ_PRIOTITY" %}
{% endif %}
- {{ _irq_record(manifest.manifest.name, handler.signal, irq_data.line, irq_data.priority) }}
+ {{ _irq_record(partition.manifest.name, handler.signal, irq_data.line, irq_data.priority) }}
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
{% endfor %}
@@ -55,49 +55,49 @@ extern void priv_irq_handler_main(uint32_t partition_id,
uint32_t irq_line);
/* Forward declarations of unpriv IRQ handlers*/
-{% for manifest in manifests %}
- {% if manifest.manifest.irqs %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.irqs %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% for handler in manifest.manifest.irqs %}
+ {% for handler in partition.manifest.irqs %}
extern void {{handler.signal}}_isr(void);
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
{% endfor %}
/* Definitions of privileged IRQ handlers */
-{% for manifest in manifests %}
- {% if manifest.manifest.irqs %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.irqs %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% for handler in manifest.manifest.irqs %}
+ {% for handler in partition.manifest.irqs %}
{% if handler.source is number %}
void irq_{{handler.source}}_Handler(void)
{% elif handler.source %}
void {{handler.source}}_Handler(void)
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
{
{% if handler.source %}
- priv_irq_handler_main({{manifest.manifest.name}},
+ priv_irq_handler_main({{partition.manifest.name}},
(uint32_t){{handler.signal}}_isr,
{{handler.signal}},
{{handler.source}});
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
}
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
diff --git a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
index dec813e58f..f60b9e4fcd 100644
--- a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
+++ b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -13,38 +13,38 @@
#include "psa_manifest/sid.h"
{# Produce a build error if heap_size is presented in the manifest, because of the dynamic memory allocation is not supported now. #}
-{% for manifest in manifests %}
- {% if manifest.manifest.heap_size %}
-#error "Please do not add 'heap_size' for partition '{{manifest.manifest.name}}', the dynamic memory allocation is not supported now!"
+{% for partition in partitions %}
+ {% if partition.manifest.heap_size %}
+#error "Please do not add 'heap_size' for partition '{{partition.manifest.name}}', the dynamic memory allocation is not supported now!"
{% endif %}
{% endfor %}
/**************************************************************************/
/** IRQ count per partition */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% if manifest.manifest.irqs %}
-#define TFM_PARTITION_{{manifest.manifest.name}}_IRQ_COUNT {{manifest.manifest.irqs | length() }}
+ {% if partition.manifest.irqs %}
+#define TFM_PARTITION_{{partition.manifest.name}}_IRQ_COUNT {{partition.manifest.irqs | length() }}
{% else %}
-#define TFM_PARTITION_{{manifest.manifest.name}}_IRQ_COUNT 0
+#define TFM_PARTITION_{{partition.manifest.name}}_IRQ_COUNT 0
{% endif %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
/**************************************************************************/
/** Declarations of partition init functions */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-extern void {{manifest.manifest.entry_point}}(void);
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+extern void {{partition.manifest.entry_point}}(void);
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -66,18 +66,18 @@ static uint32_t ns_interrupt_ctx_stack[
static uint32_t tfm_core_interrupt_ctx_stack[
sizeof(struct interrupted_ctx_stack_frame_t) / sizeof(uint32_t)];
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-static uint32_t ctx_stack_{{manifest.manifest.name}}[
+static uint32_t ctx_stack_{{partition.manifest.name}}[
(sizeof(struct interrupted_ctx_stack_frame_t) +
- (TFM_PARTITION_{{manifest.manifest.name}}_IRQ_COUNT) * (
+ (TFM_PARTITION_{{partition.manifest.name}}_IRQ_COUNT) * (
sizeof(struct interrupted_ctx_stack_frame_t) +
sizeof(struct handler_ctx_stack_frame_t)
)) / sizeof(uint32_t)];
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -85,13 +85,13 @@ uint32_t *ctx_stack_list[] =
{
ns_interrupt_ctx_stack,
tfm_core_interrupt_ctx_stack,
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- ctx_stack_{{manifest.manifest.name}},
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ ctx_stack_{{partition.manifest.name}},
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
};
@@ -99,15 +99,15 @@ uint32_t *ctx_stack_list[] =
/**************************************************************************/
/** Dependencies array for Secure Partition */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.manifest.dependencies %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.dependencies %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-static int32_t dependencies_{{manifest.manifest.name}}[] =
+static int32_t dependencies_{{partition.manifest.name}}[] =
{
- {% for dependence in manifest.manifest.dependencies %}
- {% for service in manifest.manifest.services %}
+ {% for dependence in partition.manifest.dependencies %}
+ {% for service in partition.manifest.services %}
{% if dependence == service.name %}
#error "Please DO NOT include SP's own RoT Service '{{dependence}}', which will cause a deadlock!"
{% endif %}
@@ -115,8 +115,8 @@ static int32_t dependencies_{{manifest.manifest.name}}[] =
{{dependence}}_SID,
{% endfor %}
};
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -136,36 +136,36 @@ const struct spm_partition_static_data_t static_data_list[] =
.partition_flags = SPM_PART_FLAG_APP_ROT | SPM_PART_FLAG_PSA_ROT,
},
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
{{'{'}}
- .partition_id = {{manifest.manifest.name}},
- {% if manifest.attr.tfm_partition_ipc %}
+ .partition_id = {{partition.manifest.name}},
+ {% if partition.attr.tfm_partition_ipc %}
.partition_flags = SPM_PART_FLAG_IPC
{% else %}
.partition_flags = 0
{% endif %}
- {% if manifest.manifest.type == "APPLICATION-ROT" %}
+ {% if partition.manifest.type == "APPLICATION-ROT" %}
| SPM_PART_FLAG_APP_ROT
- {% elif manifest.manifest.type == "PSA-ROT" %}
+ {% elif partition.manifest.type == "PSA-ROT" %}
| SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT
{% else %}
-#error "Unsupported type '{{manifest.manifest.type}}' for partition '{{manifest.manifest.name}}'!"
+#error "Unsupported type '{{partition.manifest.type}}' for partition '{{partition.manifest.name}}'!"
{% endif %}
,
- .partition_priority = TFM_PRIORITY({{manifest.manifest.priority}}),
- .partition_init = {{manifest.manifest.entry_point}},
- .dependencies_num = {{manifest.manifest.dependencies | length()}},
- {% if manifest.manifest.dependencies %}
- .p_dependencies = dependencies_{{manifest.manifest.name}},
+ .partition_priority = TFM_PRIORITY({{partition.manifest.priority}}),
+ .partition_init = {{partition.manifest.entry_point}},
+ .dependencies_num = {{partition.manifest.dependencies | length()}},
+ {% if partition.manifest.dependencies %}
+ .p_dependencies = dependencies_{{partition.manifest.name}},
{% else %}
.p_dependencies = NULL,
{% endif %}
{{'},'}}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -174,15 +174,15 @@ const struct spm_partition_static_data_t static_data_list[] =
/**************************************************************************/
/** The platform data of the partition list */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.manifest.mmio_regions %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.mmio_regions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
const struct tfm_spm_partition_platform_data_t *
- platform_data_list_{{manifest.manifest.name}}[] =
+ platform_data_list_{{partition.manifest.name}}[] =
{
- {% for region in manifest.manifest.mmio_regions %}
+ {% for region in partition.manifest.mmio_regions %}
{% if region.conditional %}
#ifdef {{region.conditional}}
{% endif %}
@@ -193,8 +193,8 @@ const struct tfm_spm_partition_platform_data_t *
{% endfor %}
NULL
};
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -204,17 +204,17 @@ const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
NULL,
NULL,
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% if manifest.manifest.mmio_regions %}
- platform_data_list_{{manifest.manifest.name}},
- {% else %}{# if manifest.manifest.mmio_regions #}
+ {% if partition.manifest.mmio_regions %}
+ platform_data_list_{{partition.manifest.name}},
+ {% else %}{# if partition.manifest.mmio_regions #}
NULL,
- {% endif %}{# if manifest.manifest.mmio_regions #}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% endif %}{# if partition.manifest.mmio_regions #}
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -228,12 +228,12 @@ static struct spm_partition_desc_t partition_list [] =
{{'{{0}}'}}, /* placeholder for Non-secure internal partition */
{{'{{0}}'}}, /* placeholder for TF-M Core internal partition */
-{% for manifest in manifests %}
+{% for partition in partitions %}
/* -----------------------------------------------------------------------*/
- /* - Partition DB record for {{manifest.manifest.name}} */
+ /* - Partition DB record for {{partition.manifest.name}} */
/* -----------------------------------------------------------------------*/
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
{{'{'}}
/* Runtime data */
@@ -241,8 +241,8 @@ static struct spm_partition_desc_t partition_list [] =
.static_data = NULL,
.platform_data_list = NULL,
{{'},'}}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
diff --git a/secure_fw/spm/cmsis_func/tfm_veneers.c.template b/secure_fw/spm/cmsis_func/tfm_veneers.c.template
index b51816466e..45cdb866e5 100644
--- a/secure_fw/spm/cmsis_func/tfm_veneers.c.template
+++ b/secure_fw/spm/cmsis_func/tfm_veneers.c.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -10,16 +10,16 @@
#include "tfm_secure_api.h"
#include "spm_partition_defs.h"
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-/******** {{manifest.manifest.name}} ********/
- {% for sec_func in manifest.manifest.secure_functions %}
+/******** {{partition.manifest.name}} ********/
+ {% for sec_func in partition.manifest.secure_functions %}
psa_status_t {{sec_func.signal.lower()}}(psa_invec *, size_t, psa_outvec *, size_t);
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -39,16 +39,16 @@ psa_status_t {{sec_func.signal.lower()}}(psa_invec *, size_t, psa_outvec *, size
in_vec, in_len, out_vec, out_len); \
}
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-/******** {{manifest.manifest.name}} ********/
- {% for sec_func in manifest.manifest.secure_functions %}
-TFM_VENEER_FUNCTION({{manifest.manifest.name}}, {{sec_func.signal.lower()}})
+/******** {{partition.manifest.name}} ********/
+ {% for sec_func in partition.manifest.secure_functions %}
+TFM_VENEER_FUNCTION({{partition.manifest.name}}, {{sec_func.signal.lower()}})
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
diff --git a/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template b/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template
index 64e2eba945..1f0f2fd255 100644
--- a/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template
+++ b/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template
@@ -7,10 +7,10 @@
{{utilities.donotedit_warning}}
-{% for manifest in manifests %}
-#ifdef {{manifest.attr.conditional}}
-#include "{{manifest.header_file}}"
-#endif /* {{manifest.attr.conditional}} */
+{% for partition in partitions %}
+#ifdef {{partition.attr.conditional}}
+#include "{{partition.header_file}}"
+#endif /* {{partition.attr.conditional}} */
{% endfor %}
@@ -21,27 +21,27 @@
/* Definitions of the signals of the IRQs (if any) */
const struct tfm_core_irq_signal_data_t tfm_core_irq_signals[] = {
-{% for manifest in manifests %}
- {% if manifest.manifest.irqs %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.irqs %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% for handler in manifest.manifest.irqs %}
+ {% for handler in partition.manifest.irqs %}
{% set irq_data = namespace() %}
{% if handler.source %}
{% set irq_data.line = handler.source %}
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
{% if handler.tfm_irq_priority %}
{% set irq_data.priority = handler.tfm_irq_priority %}
{% else %}
{% set irq_data.priority = "TFM_DEFAULT_SECURE_IRQ_PRIOTITY" %}
{% endif %}
- {{ _irq_record(manifest.manifest.name, handler.signal, irq_data.line, irq_data.priority) }}
+ {{ _irq_record(partition.manifest.name, handler.signal, irq_data.line, irq_data.priority) }}
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
{% endfor %}
@@ -52,18 +52,18 @@ const size_t tfm_core_irq_signals_count = (sizeof(tfm_core_irq_signals) /
sizeof(*tfm_core_irq_signals)) - 1; /* adjust for the dummy element */
/* Definitions of privileged IRQ handlers (if any) */
-{% for manifest in manifests %}
- {% if manifest.manifest.irqs %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.irqs %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% for handler in manifest.manifest.irqs %}
+ {% for handler in partition.manifest.irqs %}
{% if handler.source is number %}
void irq_{{handler.source}}_Handler(void)
{% elif handler.source %}
void {{handler.source}}_Handler(void)
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
{
__disable_irq();
@@ -71,16 +71,16 @@ void {{handler.source}}_Handler(void)
* in handler mode, and we will not be pre-empted as we disabled interrupts
*/
{% if handler.source %}
- tfm_irq_handler({{manifest.manifest.name}}, {{handler.signal}}, {{handler.source}});
+ tfm_irq_handler({{partition.manifest.name}}, {{handler.signal}}, {{handler.source}});
{% else %}
-#error "Interrupt source isn't provided for 'irqs' in partition {{manifest.manifest.name}}"
+#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
{% endif %}
__enable_irq();
}
{% endfor %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
diff --git a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
index 285ba59952..4d36797ac7 100644
--- a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
+++ b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -13,25 +13,25 @@
#include "psa_manifest/sid.h"
{# Produce a build error if heap_size is presented in the manifest, because of the dynamic memory allocation is not supported now. #}
-{% for manifest in manifests %}
- {% if manifest.manifest.heap_size %}
-#error "Please do not add 'heap_size' for partition '{{manifest.manifest.name}}', the dynamic memory allocation is not supported now!"
+{% for partition in partitions %}
+ {% if partition.manifest.heap_size %}
+#error "Please do not add 'heap_size' for partition '{{partition.manifest.name}}', the dynamic memory allocation is not supported now!"
{% endif %}
{% endfor %}
/**************************************************************************/
/** IRQ count per partition */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% if manifest.manifest.irqs %}
-#define TFM_PARTITION_{{manifest.manifest.name}}_IRQ_COUNT {{manifest.manifest.irqs | length() }}
+ {% if partition.manifest.irqs %}
+#define TFM_PARTITION_{{partition.manifest.name}}_IRQ_COUNT {{partition.manifest.irqs | length() }}
{% else %}
-#define TFM_PARTITION_{{manifest.manifest.name}}_IRQ_COUNT 0
+#define TFM_PARTITION_{{partition.manifest.name}}_IRQ_COUNT 0
{% endif %}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -40,13 +40,13 @@
/**************************************************************************/
extern void tfm_nspm_thread_entry(void);
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-extern void {{manifest.manifest.entry_point}}(void);
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+extern void {{partition.manifest.entry_point}}(void);
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -56,32 +56,32 @@ extern void {{manifest.manifest.entry_point}}(void);
REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Base);
REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit);
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
#if TFM_LVL == 3
-REGION_DECLARE(Image$$, PT_{{manifest.manifest.name}}_PRIVATE, _DATA_START$$Base);
-REGION_DECLARE(Image$$, PT_{{manifest.manifest.name}}_PRIVATE, _DATA_END$$Base);
+REGION_DECLARE(Image$$, PT_{{partition.manifest.name}}_PRIVATE, _DATA_START$$Base);
+REGION_DECLARE(Image$$, PT_{{partition.manifest.name}}_PRIVATE, _DATA_END$$Base);
#endif
-extern uint8_t {{manifest.manifest.name.lower()}}_stack[];
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+extern uint8_t {{partition.manifest.name.lower()}}_stack[];
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
/**************************************************************************/
/** Dependencies array for Secure Partition */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.manifest.dependencies %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.dependencies %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
-static uint32_t dependencies_{{manifest.manifest.name}}[] =
+static uint32_t dependencies_{{partition.manifest.name}}[] =
{
- {% for dependence in manifest.manifest.dependencies %}
- {% for service in manifest.manifest.services %}
+ {% for dependence in partition.manifest.dependencies %}
+ {% for service in partition.manifest.services %}
{% if dependence == service.name %}
#error "Please DO NOT include SP's own RoT Service '{{dependence}}', which will cause a deadlock!"
{% endif %}
@@ -89,8 +89,8 @@ static uint32_t dependencies_{{manifest.manifest.name}}[] =
{{dependence}}_SID,
{% endfor %}
};
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -114,43 +114,43 @@ const struct partition_static_t static_data_list[] =
.stack_size = 0
},
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
{{'{'}}
- {% if manifest.manifest.psa_framework_version == 1.0 %}
+ {% if partition.manifest.psa_framework_version == 1.0 %}
.psa_ff_ver = 0x0100,
{% else %}
.psa_ff_ver = 0,
{% endif %}
- .pid = {{manifest.manifest.name}},
- {% if manifest.attr.tfm_partition_ipc %}
+ .pid = {{partition.manifest.name}},
+ {% if partition.attr.tfm_partition_ipc %}
.flags = SPM_PART_FLAG_IPC
{% else %}
.flags = 0
{% endif %}
- {% if manifest.manifest.type == "APPLICATION-ROT" %}
+ {% if partition.manifest.type == "APPLICATION-ROT" %}
| SPM_PART_FLAG_APP_ROT
- {% elif manifest.manifest.type == "PSA-ROT" %}
+ {% elif partition.manifest.type == "PSA-ROT" %}
| SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT
{% else %}
-#error "Unsupported type '{{manifest.manifest.type}}' for partition '{{manifest.manifest.name}}'!"
+#error "Unsupported type '{{partition.manifest.type}}' for partition '{{partition.manifest.name}}'!"
{% endif %}
,
- .priority = TFM_PRIORITY({{manifest.manifest.priority}}),
- .entry = {{manifest.manifest.entry_point}},
+ .priority = TFM_PRIORITY({{partition.manifest.priority}}),
+ .entry = {{partition.manifest.entry_point}},
.stack_base_addr = 0,
.stack_size = 0,
- .ndeps = {{manifest.manifest.dependencies | length()}},
- {% if manifest.manifest.dependencies %}
- .deps = dependencies_{{manifest.manifest.name}},
+ .ndeps = {{partition.manifest.dependencies | length()}},
+ {% if partition.manifest.dependencies %}
+ .deps = dependencies_{{partition.manifest.name}},
{% else %}
.deps = NULL,
{% endif %}
{{'},'}}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -159,15 +159,15 @@ const struct partition_static_t static_data_list[] =
/**************************************************************************/
/** The platform data of the partition list */
/**************************************************************************/
-{% for manifest in manifests %}
- {% if manifest.manifest.mmio_regions %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.manifest.mmio_regions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
const struct tfm_spm_partition_platform_data_t *
- platform_data_list_{{manifest.manifest.name}}[] =
+ platform_data_list_{{partition.manifest.name}}[] =
{
- {% for region in manifest.manifest.mmio_regions %}
+ {% for region in partition.manifest.mmio_regions %}
{% if region.conditional %}
#ifdef {{region.conditional}}
{% endif %}
@@ -178,8 +178,8 @@ const struct tfm_spm_partition_platform_data_t *
{% endfor %}
NULL
};
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endif %}
@@ -188,17 +188,17 @@ const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
{
NULL,
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
- {% if manifest.manifest.mmio_regions %}
- platform_data_list_{{manifest.manifest.name}},
- {% else %}{# if manifest.manifest.mmio_regions #}
+ {% if partition.manifest.mmio_regions %}
+ platform_data_list_{{partition.manifest.name}},
+ {% else %}{# if partition.manifest.mmio_regions #}
NULL,
- {% endif %}{# if manifest.manifest.mmio_regions #}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% endif %}{# if partition.manifest.mmio_regions #}
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -217,20 +217,20 @@ const struct tfm_spm_partition_memory_data_t memory_data_list[] =
.stack_bottom = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base),
.stack_top = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit),
},
-{% for manifest in manifests %}
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+{% for partition in partitions %}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
{{'{'}}
#if TFM_LVL == 3
- .data_start = PART_REGION_ADDR(PT_{{manifest.manifest.name}}_PRIVATE, _DATA_START$$Base),
- .data_limit = PART_REGION_ADDR(PT_{{manifest.manifest.name}}_PRIVATE, _DATA_END$$Base),
+ .data_start = PART_REGION_ADDR(PT_{{partition.manifest.name}}_PRIVATE, _DATA_START$$Base),
+ .data_limit = PART_REGION_ADDR(PT_{{partition.manifest.name}}_PRIVATE, _DATA_END$$Base),
#endif
- .stack_bottom = (uint32_t){{manifest.manifest.name.lower()}}_stack,
- .stack_top = (uint32_t)({{manifest.manifest.name.lower()}}_stack + {{manifest.manifest.stack_size}}),
+ .stack_bottom = (uint32_t){{partition.manifest.name.lower()}}_stack,
+ .stack_top = (uint32_t)({{partition.manifest.name.lower()}}_stack + {{partition.manifest.stack_size}}),
{{'},'}}
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
@@ -243,16 +243,16 @@ static struct partition_t partition_list [] =
{
{{'{0}'}}, /* placeholder for Non-secure internal partition */
-{% for manifest in manifests %}
+{% for partition in partitions %}
/* -----------------------------------------------------------------------*/
- /* - Partition DB record for {{manifest.manifest.name}} */
+ /* - Partition DB record for {{partition.manifest.name}} */
/* -----------------------------------------------------------------------*/
- {% if manifest.attr.conditional %}
-#ifdef {{manifest.attr.conditional}}
+ {% if partition.attr.conditional %}
+#ifdef {{partition.attr.conditional}}
{% endif %}
{{'{0}'}},
- {% if manifest.attr.conditional %}
-#endif /* {{manifest.attr.conditional}} */
+ {% if partition.attr.conditional %}
+#endif /* {{partition.attr.conditional}} */
{% endif %}
{% endfor %}
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index 795d90a042..8bb1f25625 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2018-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -62,10 +62,10 @@ def process_manifest(manifest_list_files):
Returns
-------
- The manifest header list and the data base.
+ The partition data base.
"""
- db = []
+ partition_db = []
manifest_list = []
for f in manifest_list_files:
@@ -107,7 +107,7 @@ def process_manifest(manifest_list_files):
outfile_name = os.path.relpath(outfile_name, start = source_path)
intermediafile_name = os.path.relpath(intermediafile_name, start = source_path)
- db.append({"manifest": manifest, "attr": manifest_item, "header_file": outfile_name})
+ partition_db.append({"manifest": manifest, "attr": manifest_item, "header_file": outfile_name})
if OUT_DIR is not None:
outfile_name = os.path.join(OUT_DIR, outfile_name)
@@ -133,7 +133,7 @@ def process_manifest(manifest_list_files):
memoutfile.write(memorytemplate.render(context))
memoutfile.close()
- return db
+ return partition_db
def gen_files(context, gen_file_lists):
"""
@@ -246,14 +246,14 @@ def main():
"""
os.chdir(os.path.join(sys.path[0], ".."))
- db = process_manifest(manifest_list)
+ partition_db = process_manifest(manifest_list)
utilities = {}
context = {}
utilities['donotedit_warning']=donotedit_warning
- context['manifests'] = db
+ context['partitions'] = partition_db
context['utilities'] = utilities
gen_files(context, gen_file_list)