Maulik Patel | 8733d79 | 2024-06-12 12:43:07 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2024, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | /***********{{utilities.donotedit_warning}}***********/ |
David Hu | 72dd2c0 | 2024-09-20 14:04:14 +0100 | [diff] [blame] | 8 | #include <stddef.h> |
Maulik Patel | 8733d79 | 2024-06-12 12:43:07 +0100 | [diff] [blame] | 9 | #include "ns_mailbox_client_id.h" |
| 10 | #include "tfm_peripherals_def.h" |
| 11 | |
David Hu | 72dd2c0 | 2024-09-20 14:04:14 +0100 | [diff] [blame] | 12 | /* Non-secure client ID range for Mailbox NS Agent IRQs */ |
Maulik Patel | 8733d79 | 2024-06-12 12:43:07 +0100 | [diff] [blame] | 13 | const struct tfm_ns_mailbox_client_id_info ns_mailbox_client_id_info[] = { |
| 14 | {% for partition in partitions %} |
| 15 | {% if partition.manifest.ns_agent %} |
| 16 | {% if partition.manifest.irqs %} |
| 17 | /******** {{partition.manifest.name}} ********/ |
| 18 | {% for irq in partition.manifest.irqs %} |
| 19 | { |
| 20 | {{"%-20s"|format(".source = ")}} {{"%10s"|format(irq.source)}}, |
| 21 | {{"%-20s"|format(".client_id_base = ")}} {{"%10s"|format(irq.source + "_CLIENT_ID_BASE")}}, |
| 22 | {{"%-20s"|format(".client_id_limit = ")}} {{"%10s"|format(irq.source + "_CLIENT_ID_LIMIT")}}, |
| 23 | }, |
| 24 | {% endfor %} |
| 25 | {% endif %} |
| 26 | {% endif %} |
| 27 | {% endfor %} |
| 28 | }; |
David Hu | 72dd2c0 | 2024-09-20 14:04:14 +0100 | [diff] [blame] | 29 | |
| 30 | /* |
| 31 | * List of owners of non-secure client ID ranges. |
| 32 | * Each element in ns_mailbox_client_id_range_owner[] is the owner of the |
| 33 | * corresponding element in ns_mailbox_client_id_info[]. |
| 34 | */ |
| 35 | {% for partition in partitions %} |
| 36 | {% if partition.manifest.ns_agent %} |
| 37 | {% set irq_count = partition.manifest.irqs|count %} |
| 38 | void *ns_mailbox_client_id_range_owner[{{irq_count}}] = {NULL}; |
| 39 | {% endif %} |
| 40 | {% endfor %} |