aboutsummaryrefslogtreecommitdiff
path: root/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc.template
blob: f5faa43ad947539778ba8f629bff505b5c133a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */

{{utilities.donotedit_warning}}

/* Definitions of privileged IRQ handlers (if any) */
{% for partition in partitions %}
    {% if partition.manifest.irqs %}
        {% if partition.attr.conditional %}
#ifdef {{partition.attr.conditional}}
        {% endif %}
#include "{{partition.header_file}}"
        {% for irq in partition.manifest.irqs %}
            {% set irq_data = namespace() %}
            {% if partition.manifest.psa_framework_version == 1.0 %}
                {% set irq_data.signal = irq.signal %}
            {% else %}
                {% set irq_data.signal = irq.name + "_SIGNAL" %}
            {% endif %}
            {% if irq.source is number %}
void irq_{{irq.source}}_Handler(void)
            {% elif irq.source %}
void {{irq.source}}_Handler(void)
            {% else %}
#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
            {% endif %}
{
            {% if irq.source %}
                {% if partition.manifest.psa_framework_version == 1.1 and irq.handling == "FLIH" %}
#error "FLIH is not supported yet!"
                {% else %}
    tfm_set_irq_signal({{partition.manifest.name}}, {{irq_data.signal}}, {{irq.source}});
                {% endif %}
            {% else %}
#error "Interrupt source isn't provided for 'irqs' in partition {{partition.manifest.name}}"
            {% endif %}
}

        {% endfor %}
        {% if partition.attr.conditional %}
#endif /* {{partition.attr.conditional}} */
        {% endif %}

    {% endif %}
{% endfor %}