Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 1 | /* |
Sherry Zhang | f58f2bd | 2022-01-10 17:21:11 +0800 | [diff] [blame] | 2 | * Copyright (c) 2021-2022, Arm Limited. All rights reserved. |
Chris Brand | b8bf9a9 | 2021-11-02 17:22:54 -0700 | [diff] [blame] | 3 | * Copyright (c) 2021, Cypress Semiconductor Corporation. All rights reserved. |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 4 | * |
| 5 | * SPDX-License-Identifier: BSD-3-Clause |
| 6 | * |
| 7 | */ |
| 8 | |
Sherry Zhang | f58f2bd | 2022-01-10 17:21:11 +0800 | [diff] [blame] | 9 | /***********{{utilities.donotedit_warning}}***********/ |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 10 | |
| 11 | #include <stdint.h> |
| 12 | #include <stddef.h> |
| 13 | #include "region.h" |
Chris Brand | b8bf9a9 | 2021-11-02 17:22:54 -0700 | [diff] [blame] | 14 | #include "region_defs.h" |
Ken Liu | ea45b0d | 2021-05-22 17:41:25 +0800 | [diff] [blame] | 15 | #include "spm_ipc.h" |
Ken Liu | 3dd9256 | 2021-08-17 16:22:54 +0800 | [diff] [blame] | 16 | #include "load/interrupt_defs.h" |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 17 | #include "load/partition_defs.h" |
| 18 | #include "load/service_defs.h" |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 19 | #include "load/asset_defs.h" |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 20 | #include "tfm_peripherals_def.h" |
| 21 | #include "psa_manifest/pid.h" |
| 22 | #include "psa_manifest/sid.h" |
Ken Liu | 861b078 | 2021-05-22 13:15:08 +0800 | [diff] [blame] | 23 | #include "psa_manifest/{{manifest_out_basename}}.h" |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 24 | |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 25 | {% set counter = namespace() %} |
Kevin Peng | cf7f813 | 2021-10-25 15:36:26 +0800 | [diff] [blame] | 26 | {% set counter.dep_counter = manifest.dependencies|count + manifest.weak_dependencies|count %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 27 | #define {{"%-55s"|format(manifest.name|upper + "_NDEPS")}} ({{"%d"|format(counter.dep_counter)}}) |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 28 | {% set counter.service_counter = manifest.services|count %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 29 | #define {{"%-55s"|format(manifest.name|upper + "_NSERVS")}} ({{"%d"|format(counter.service_counter)}}) |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 30 | {% set counter.asset_counter = manifest.mmio_regions|count %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 31 | #if TFM_LVL == 3 |
| 32 | #define {{"%-55s"|format(manifest.name|upper + "_NASSETS")}} ({{"%d"|format(counter.asset_counter)}} + 1) |
| 33 | #else |
| 34 | #define {{"%-55s"|format(manifest.name|upper + "_NASSETS")}} ({{"%d"|format(counter.asset_counter)}}) |
| 35 | #endif |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 36 | {% set counter.irq_counter = manifest.irqs|count %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 37 | #define {{"%-55s"|format(manifest.name|upper + "_NIRQS")}} ({{"%d"|format(counter.irq_counter)}}) |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 38 | |
| 39 | /* Memory region declaration */ |
| 40 | #if TFM_LVL == 3 |
| 41 | REGION_DECLARE(Image$$, PT_{{manifest.name}}_PRIVATE, _DATA_START$$Base); |
| 42 | REGION_DECLARE(Image$$, PT_{{manifest.name}}_PRIVATE, _DATA_END$$Base); |
| 43 | #endif |
| 44 | extern uint8_t {{manifest.name|lower}}_stack[]; |
| 45 | |
| 46 | /* Entrypoint function declaration */ |
Shawn Shan | caefb8f | 2021-04-15 14:19:13 +0800 | [diff] [blame] | 47 | {% if manifest.entry_point %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 48 | extern void {{manifest.entry_point}}(void); |
Shawn Shan | caefb8f | 2021-04-15 14:19:13 +0800 | [diff] [blame] | 49 | {% elif manifest.entry_init %} |
| 50 | extern psa_status_t {{manifest.entry_init}}(void); |
| 51 | {% endif %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 52 | |
Kevin Peng | ec239bb | 2021-09-03 15:40:27 +0800 | [diff] [blame] | 53 | /* Interrupt init functions */ |
| 54 | {% if counter.irq_counter > 0 %} |
| 55 | {% for irq in manifest.irqs %} |
| 56 | {% if irq.source is number %}} |
| 57 | extern enum tfm_hal_status_t {{"irq_" + irq.source|string + "_init"}}(void *p_pt, |
| 58 | struct irq_load_info_t *p_ildi); |
| 59 | {% else %} |
| 60 | extern enum tfm_hal_status_t {{irq.source|lower + "_init"}}(void *p_pt, |
| 61 | struct irq_load_info_t *p_ildi); |
| 62 | {% endif %} |
| 63 | {% endfor %} |
| 64 | {% endif %} |
| 65 | |
Mingyang Sun | 8d004f7 | 2021-06-01 10:46:26 +0800 | [diff] [blame] | 66 | /* partition load info type definition */ |
Ken Liu | 4520ce3 | 2021-05-11 22:49:10 +0800 | [diff] [blame] | 67 | struct partition_{{manifest.name|lower}}_load_info_t { |
Mingyang Sun | 8d004f7 | 2021-06-01 10:46:26 +0800 | [diff] [blame] | 68 | /* common length load data */ |
| 69 | struct partition_load_info_t load_info; |
| 70 | /* per-partition variable length load data */ |
Ken Liu | acd2a57 | 2021-05-12 16:19:04 +0800 | [diff] [blame] | 71 | uintptr_t stack_addr; |
| 72 | uintptr_t heap_addr; |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 73 | {% if counter.dep_counter > 0 %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 74 | uint32_t deps[{{(manifest.name|upper + "_NDEPS")}}]; |
| 75 | {% endif %} |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 76 | {% if counter.service_counter > 0 %} |
Ken Liu | acd2a57 | 2021-05-12 16:19:04 +0800 | [diff] [blame] | 77 | struct service_load_info_t services[{{(manifest.name|upper + "_NSERVS")}}]; |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 78 | {% endif %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 79 | #if TFM_LVL == 3 |
| 80 | struct asset_desc_t assets[{{(manifest.name|upper + "_NASSETS")}}]; |
| 81 | #else |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 82 | {% if counter.asset_counter > 0 %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 83 | struct asset_desc_t assets[{{(manifest.name|upper + "_NASSETS")}}]; |
| 84 | {% endif %} |
| 85 | #endif |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 86 | {% if counter.irq_counter > 0 %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 87 | struct irq_load_info_t irqs[{{(manifest.name|upper + "_NIRQS")}}]; |
| 88 | {% endif %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 89 | } __attribute__((aligned(4))); |
| 90 | |
Mingyang Sun | 8d004f7 | 2021-06-01 10:46:26 +0800 | [diff] [blame] | 91 | /* Partition load, deps, service load data. Put to a dedicated section. */ |
Michel Jaouen | f9de50e | 2021-08-03 17:42:30 +0200 | [diff] [blame] | 92 | #if defined(__ICCARM__) |
| 93 | #pragma location = ".part_load" |
| 94 | __root |
| 95 | #endif /* __ICCARM__ */ |
Mingyang Sun | 8d004f7 | 2021-06-01 10:46:26 +0800 | [diff] [blame] | 96 | const struct partition_{{manifest.name|lower}}_load_info_t {{manifest.name|lower}}_load |
| 97 | __attribute__((used, section(".part_load"))) = { |
| 98 | .load_info = { |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 99 | {% if manifest.psa_framework_version == 1.0 %} |
| 100 | .psa_ff_ver = 0x0100 | PARTITION_INFO_MAGIC, |
| 101 | {% elif manifest.psa_framework_version == 1.1 %} |
| 102 | .psa_ff_ver = 0x0101 | PARTITION_INFO_MAGIC, |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 103 | {% endif %} |
| 104 | .pid = {{manifest.name}}, |
| 105 | .flags = 0 |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 106 | {% if manifest.model == "IPC" %} |
Ken Liu | 59728d0 | 2021-10-06 12:47:39 +0800 | [diff] [blame] | 107 | | PARTITION_MODEL_IPC |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 108 | {% endif %} |
| 109 | {% if manifest.type == "PSA-ROT" %} |
Ken Liu | 897e8f1 | 2022-02-10 03:21:17 +0100 | [diff] [blame] | 110 | | PARTITION_MODEL_PSA_ROT |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 111 | {% endif %} |
| 112 | | PARTITION_PRI_{{manifest.priority}}, |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 113 | .entry = ENTRY_TO_POSITION({{manifest.entry}}), |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 114 | .stack_size = {{manifest.stack_size}}, |
| 115 | .heap_size = 0, |
| 116 | .ndeps = {{(manifest.name|upper + "_NDEPS")}}, |
| 117 | .nservices = {{(manifest.name|upper + "_NSERVS")}}, |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 118 | .nassets = {{(manifest.name|upper + "_NASSETS")}}, |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 119 | .nirqs = {{(manifest.name|upper + "_NIRQS")}}, |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 120 | }, |
Ken Liu | acd2a57 | 2021-05-12 16:19:04 +0800 | [diff] [blame] | 121 | .stack_addr = (uintptr_t){{manifest.name|lower}}_stack, |
| 122 | .heap_addr = 0, |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 123 | {% if counter.dep_counter > 0 %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 124 | .deps = { |
| 125 | {% for dep in manifest.dependencies %} |
| 126 | {{dep}}_SID, |
| 127 | {% endfor %} |
Kevin Peng | cf7f813 | 2021-10-25 15:36:26 +0800 | [diff] [blame] | 128 | {% for dep in manifest.weak_dependencies %} |
| 129 | #ifdef {{dep}}_SID |
| 130 | {{dep}}_SID, |
| 131 | #endif |
| 132 | {% endfor %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 133 | }, |
| 134 | {% endif %} |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 135 | {% if counter.service_counter > 0 %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 136 | .services = { |
| 137 | {% for service in manifest.services %} |
| 138 | { |
| 139 | .name_strid = STRING_PTR_TO_STRID("{{service.name}}"), |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 140 | {% if manifest.model == "SFN" %} |
Shawn Shan | caefb8f | 2021-04-15 14:19:13 +0800 | [diff] [blame] | 141 | .sfn = ENTRY_TO_POSITION({{service.name|lower}}_sfn), |
Kevin Peng | 43160d5 | 2022-02-11 13:35:56 +0800 | [diff] [blame] | 142 | {% else %} |
| 143 | .sfn = 0, |
| 144 | {% endif %} |
| 145 | #if CONFIG_TFM_SPM_BACKEND_IPC == 1 |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 146 | {% if manifest.model == "SFN" %} |
| 147 | .signal = {{service.signal_value}}, |
Kevin Peng | 43160d5 | 2022-02-11 13:35:56 +0800 | [diff] [blame] | 148 | {% else %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 149 | .signal = {{service.name}}_SIGNAL, |
Kevin Peng | 43160d5 | 2022-02-11 13:35:56 +0800 | [diff] [blame] | 150 | {% endif %} |
| 151 | #endif /* CONFIG_TFM_SPM_BACKEND_IPC == 1 */ |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 152 | .sid = {{service.sid}}, |
| 153 | .flags = 0 |
| 154 | {% if service.non_secure_clients is sameas true %} |
| 155 | | SERVICE_FLAG_NS_ACCESSIBLE |
| 156 | {% endif %} |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 157 | {% if service.connection_based is sameas false %} |
Mingyang Sun | a03ad02 | 2021-06-01 20:41:15 +0800 | [diff] [blame] | 158 | | SERVICE_FLAG_STATELESS | 0x{{"%x"|format(service.stateless_handle_index)}} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 159 | {% endif %} |
Kevin Peng | 5c3fee7 | 2022-02-16 22:25:22 +0800 | [diff] [blame^] | 160 | {% if service.mm_iovec == "enable" %} |
Shawn Shan | 7d88ae9 | 2021-09-09 15:32:02 +0800 | [diff] [blame] | 161 | | SERVICE_FLAG_MM_IOVEC |
| 162 | {% endif %} |
Ken Liu | b3b2cb6 | 2021-05-22 00:39:28 +0800 | [diff] [blame] | 163 | | SERVICE_VERSION_POLICY_{{service.version_policy}}, |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 164 | .version = {{service.version}}, |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 165 | }, |
| 166 | {% endfor %} |
| 167 | }, |
| 168 | {% endif %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 169 | #if TFM_LVL == 3 |
| 170 | .assets = { |
| 171 | { |
Mingyang Sun | df02b85 | 2021-07-27 14:29:25 +0800 | [diff] [blame] | 172 | .mem.start = PART_REGION_ADDR(PT_{{manifest.name}}_PRIVATE, _DATA_START$$Base), |
| 173 | .mem.limit = PART_REGION_ADDR(PT_{{manifest.name}}_PRIVATE, _DATA_END$$Base), |
| 174 | .attr = ASSET_ATTR_READ_WRITE, |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 175 | }, |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 176 | {% if counter.asset_counter > 0 %} |
| 177 | {% for region in manifest.mmio_regions %} |
| 178 | {% if region.conditional %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 179 | #ifdef {{region.conditional}} |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 180 | {% endif %} |
Mingyang Sun | df02b85 | 2021-07-27 14:29:25 +0800 | [diff] [blame] | 181 | {% if region.base and region.size %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 182 | { |
Mingyang Sun | df02b85 | 2021-07-27 14:29:25 +0800 | [diff] [blame] | 183 | .mem.start = {{region.base}}, |
| 184 | .mem.limit = {{region.base}} + {{region.size}}, |
| 185 | .attr = ASSET_ATTR_NUMBERED_MMIO |
| 186 | {% elif region.name %} |
| 187 | { |
| 188 | .dev.dev_ref = PTR_TO_REFERENCE({{region.name}}), |
| 189 | .attr = ASSET_ATTR_NAMED_MMIO |
| 190 | {% endif %} |
| 191 | {% if region.permission == "READ-WRITE" %} |
| 192 | | ASSET_ATTR_READ_WRITE, |
| 193 | {% else %} |
| 194 | | ASSET_ATTR_READ_ONLY, |
| 195 | {% endif %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 196 | }, |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 197 | {% if region.conditional %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 198 | #endif |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 199 | {% endif %} |
| 200 | {% endfor %} |
| 201 | {% endif %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 202 | }, |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 203 | #else |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 204 | {% if counter.asset_counter > 0 %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 205 | .assets = { |
| 206 | {% for region in manifest.mmio_regions %} |
| 207 | {% if region.conditional %} |
| 208 | #ifdef {{region.conditional}} |
| 209 | {% endif %} |
Mingyang Sun | df02b85 | 2021-07-27 14:29:25 +0800 | [diff] [blame] | 210 | {% if region.base and region.size %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 211 | { |
Mingyang Sun | df02b85 | 2021-07-27 14:29:25 +0800 | [diff] [blame] | 212 | .mem.start = {{region.base}}, |
| 213 | .mem.limit = {{region.base}} + {{region.size}}, |
| 214 | .attr = ASSET_ATTR_NUMBERED_MMIO |
| 215 | {% elif region.name %} |
| 216 | { |
| 217 | .dev.dev_ref = PTR_TO_REFERENCE({{region.name}}), |
| 218 | .attr = ASSET_ATTR_NAMED_MMIO |
| 219 | {% endif %} |
| 220 | {% if region.permission == "READ-WRITE" %} |
| 221 | | ASSET_ATTR_READ_WRITE, |
| 222 | {% else %} |
| 223 | | ASSET_ATTR_READ_ONLY, |
| 224 | {% endif %} |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 225 | }, |
| 226 | {% if region.conditional %} |
| 227 | #endif |
| 228 | {% endif %} |
| 229 | {% endfor %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 230 | }, |
Ken Liu | 8668628 | 2021-04-27 11:11:15 +0800 | [diff] [blame] | 231 | {% endif %} |
| 232 | #endif |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 233 | {% if counter.irq_counter > 0 %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 234 | .irqs = { |
| 235 | {% for irq in manifest.irqs %} |
| 236 | {% set irq_info = namespace() %} |
| 237 | {% set irq_info.source = irq.source %} |
Kevin Peng | ec239bb | 2021-09-03 15:40:27 +0800 | [diff] [blame] | 238 | {% if irq.source is number %}} |
| 239 | {% set irq_info.source_symbol = "irq_" + irq.source|string %} |
| 240 | {% else %} |
| 241 | {% set irq_info.source_symbol = irq.source|lower %} |
| 242 | {% endif %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 243 | {% if manifest.psa_framework_version == 1.1 and irq.handling == "FLIH" %} |
Kevin Peng | ec239bb | 2021-09-03 15:40:27 +0800 | [diff] [blame] | 244 | {% set irq_info.flih_func = irq.name|lower + "_flih" %} |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 245 | {% else %} |
| 246 | {% set irq_info.flih_func = 0 %} |
| 247 | {% endif %} |
| 248 | {% if manifest.psa_framework_version == 1.0 %} |
| 249 | {% set irq_info.signal = irq.signal %} |
| 250 | {% else %} |
| 251 | {% set irq_info.signal = irq.name + "_SIGNAL" %} |
| 252 | {% endif %} |
| 253 | { |
Kevin Peng | ec239bb | 2021-09-03 15:40:27 +0800 | [diff] [blame] | 254 | .init = {{irq_info.source_symbol + "_init"}}, |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 255 | .flih_func = {{irq_info.flih_func}}, |
Kevin Peng | ec239bb | 2021-09-03 15:40:27 +0800 | [diff] [blame] | 256 | .pid = {{manifest.name}}, |
| 257 | .source = {{irq_info.source}}, |
| 258 | .signal = {{irq_info.signal}}, |
Kevin Peng | 27e4227 | 2021-05-24 17:58:53 +0800 | [diff] [blame] | 259 | }, |
| 260 | {% endfor %} |
| 261 | }, |
| 262 | {% endif %} |
Mingyang Sun | f6a7857 | 2021-04-02 16:51:05 +0800 | [diff] [blame] | 263 | }; |
Ken Liu | ea45b0d | 2021-05-22 17:41:25 +0800 | [diff] [blame] | 264 | |
| 265 | /* Placeholder for partition and service runtime space. Do not reference it. */ |
Michel Jaouen | f9de50e | 2021-08-03 17:42:30 +0200 | [diff] [blame] | 266 | #if defined(__ICCARM__) |
| 267 | #pragma location=".bss.part_runtime" |
| 268 | __root |
| 269 | #endif /* __ICCARM__ */ |
Ken Liu | ea45b0d | 2021-05-22 17:41:25 +0800 | [diff] [blame] | 270 | static struct partition_t {{manifest.name|lower}}_partition_runtime_item |
| 271 | __attribute__((used, section(".bss.part_runtime"))); |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 272 | {% if counter.service_counter > 0 %} |
Michel Jaouen | f9de50e | 2021-08-03 17:42:30 +0200 | [diff] [blame] | 273 | #if defined(__ICCARM__) |
| 274 | #pragma location = ".bss.serv_runtime" |
| 275 | __root |
| 276 | #endif /* __ICCARM__ */ |
Ken Liu | ea45b0d | 2021-05-22 17:41:25 +0800 | [diff] [blame] | 277 | static struct service_t {{manifest.name|lower}}_service_runtime_item[{{(manifest.name|upper + "_NSERVS")}}] |
| 278 | __attribute__((used, section(".bss.serv_runtime"))); |
Mingyang Sun | b83b7bc | 2021-07-02 16:25:15 +0800 | [diff] [blame] | 279 | {% endif %} |