diff options
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.template | 168 |
1 files changed, 0 insertions, 168 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 503288f533..9e8c9922ee 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 @@ -36,174 +36,6 @@ {% endif %} {% endfor %} -/**************************************************************************/ -/** Declarations of partition init functions */ -/**************************************************************************/ -extern void tfm_nspm_thread_entry(void); - -{% for partition in partitions %} - {% if partition.attr.conditional %} -#ifdef {{partition.attr.conditional}} - {% endif %} -extern void {{partition.manifest.entry_point}}(void); - {% if partition.attr.conditional %} -#endif /* {{partition.attr.conditional}} */ - {% endif %} - -{% endfor %} -/**************************************************************************/ -/** Memory region declarations */ -/**************************************************************************/ -REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Base); -REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit); - -{% for partition in partitions %} - {% if partition.attr.conditional %} -#ifdef {{partition.attr.conditional}} - {% endif %} -#if TFM_LVL == 3 -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 {{partition.manifest.name.lower()}}_stack[]; - {% if partition.attr.conditional %} -#endif /* {{partition.attr.conditional}} */ - {% endif %} - -{% endfor %} -/**************************************************************************/ -/** Dependencies array for Secure Partition */ -/**************************************************************************/ -{% for partition in partitions %} - {% if partition.manifest.dependencies %} - {% if partition.attr.conditional %} -#ifdef {{partition.attr.conditional}} - {% endif %} -static uint32_t dependencies_{{partition.manifest.name}}[] = -{ - {% 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 %} - {% endfor %} - {{dependence}}_SID, - {% endfor %} -}; - {% if partition.attr.conditional %} -#endif /* {{partition.attr.conditional}} */ - {% endif %} - - {% endif %} -{% endfor %} - -/**************************************************************************/ -/** The platform data of the partition list */ -/**************************************************************************/ -{% for partition in partitions %} - {% if partition.manifest.mmio_regions %} - {% if partition.attr.conditional %} -#ifdef {{partition.attr.conditional}} - {% endif %} -const struct platform_data_t * - platform_data_list_{{partition.manifest.name}}[] = -{ - {% for region in partition.manifest.mmio_regions %} - {% if region.conditional %} -#ifdef {{region.conditional}} - {% endif %} - {{region.name}}, - {% if region.conditional %} -#endif /* {{region.conditional}} */ - {% endif %} - {% endfor %} - NULL -}; - {% if partition.attr.conditional %} -#endif /* {{partition.attr.conditional}} */ - {% endif %} - - {% endif %} -{% endfor %} - -/**************************************************************************/ -/** The static data of the partition list */ -/**************************************************************************/ -const struct partition_static_t static_data_list[] = -{ - { - .psa_ff_ver = 0x0100, - .pid = TFM_SP_NON_SECURE_ID, -#if TFM_MULTI_CORE_TOPOLOGY - .flags = SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_IPC, -#else - .flags = SPM_PART_FLAG_IPC, -#endif - .priority = PARTITION_PRI_LOWEST, - .entry = tfm_nspm_thread_entry, - .stack_base_addr = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), - .stack_size = S_PSP_STACK_SIZE, -#if TFM_LVL == 3 - .mems = { - .start = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), - .limit = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit), - }, -#endif - }, - -{% for partition in partitions %} - {% if partition.attr.conditional %} -#ifdef {{partition.attr.conditional}} - {% endif %} - {{'{'}} - {% if partition.manifest.psa_framework_version == 1.0 %} - .psa_ff_ver = 0x0100, - {% elif partition.manifest.psa_framework_version == 1.1 %} - .psa_ff_ver = 0x0101, - {% else %} - .psa_ff_ver = 0, - {% endif %} - .pid = {{partition.manifest.name}}, - {% if partition.attr.tfm_partition_ipc %} - .flags = SPM_PART_FLAG_IPC - {% else %} - .flags = 0 - {% endif %} - {% if partition.manifest.type == "APPLICATION-ROT" %} - | 0, - {% elif partition.manifest.type == "PSA-ROT" %} - | SPM_PART_FLAG_PSA_ROT, - {% else %} -#error "Unsupported type '{{partition.manifest.type}}' for partition '{{partition.manifest.name}}'!" - {% endif %} - .priority = PARTITION_PRI_{{partition.manifest.priority}}, - .entry = {{partition.manifest.entry_point}}, - .stack_base_addr = (uint32_t){{partition.manifest.name.lower()}}_stack, - .stack_size = (uint32_t){{partition.manifest.stack_size}}, - {% if partition.manifest.mmio_regions %} - .platform_data = (uintptr_t)platform_data_list_{{partition.manifest.name}}, - {% else %}{# if partition.manifest.mmio_regions #} - .platform_data = 0, - {% endif %}{# if partition.manifest.mmio_regions #} - .ndeps = {{partition.manifest.dependencies | length()}}, - {% if partition.manifest.dependencies %} - .deps = dependencies_{{partition.manifest.name}}, - {% else %} - .deps = NULL, - {% endif %} -#if TFM_LVL == 3 - .mems = { - .start = PART_REGION_ADDR(PT_{{partition.manifest.name}}_PRIVATE, _DATA_START$$Base), - .limit = PART_REGION_ADDR(PT_{{partition.manifest.name}}_PRIVATE, _DATA_END$$Base), - }, -#endif - {{'},'}} - {% if partition.attr.conditional %} -#endif /* {{partition.attr.conditional}} */ - {% endif %} - -{% endfor %} -}; /**************************************************************************/ /** The partition list for the DB */ |