aboutsummaryrefslogtreecommitdiff
path: root/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template
diff options
context:
space:
mode:
Diffstat (limited to 'secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template')
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc.template166
1 files changed, 83 insertions, 83 deletions
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 %}