diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-09-22 08:32:09 +0100 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-10-16 16:50:01 +0100 |
commit | 74dce7fa6e42cab3aa54a9543e4a546c1450b2ae (patch) | |
tree | 934d39529b67d798867e252b039f4f8fcae74a67 /plat/common/plat_gicv3.c | |
parent | f3a866004ea8f9a0cd5420f3dd4d4683f638e6da (diff) | |
download | arm-trusted-firmware-74dce7fa6e42cab3aa54a9543e4a546c1450b2ae.tar.gz |
GIC: Add APIs to set interrupt type and query support
The back end GIC driver converts and assigns the interrupt type to
suitable group.
For GICv2, a build option GICV2_G0_FOR_EL3 is introduced, which
determines to which type Group 0 interrupts maps to.
- When the build option is set 0 (the default), Group 0 interrupts are
meant for Secure EL1. This is presently the case.
- Otherwise, Group 0 interrupts are meant for EL3. This means the SPD
will have to synchronously hand over the interrupt to Secure EL1.
The query API allows the platform to query whether the platform supports
interrupts of a given type.
API documentation updated.
Change-Id: I60fdb4053ffe0bd006b3b20914914ebd311fc858
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat/common/plat_gicv3.c')
-rw-r--r-- | plat/common/plat_gicv3.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plat/common/plat_gicv3.c b/plat/common/plat_gicv3.c index 230d90ca9..f4279ec44 100644 --- a/plat/common/plat_gicv3.c +++ b/plat/common/plat_gicv3.c @@ -34,6 +34,7 @@ #pragma weak plat_ic_enable_interrupt #pragma weak plat_ic_disable_interrupt #pragma weak plat_ic_set_interrupt_priority +#pragma weak plat_ic_set_interrupt_type CASSERT((INTR_TYPE_S_EL1 == INTR_GROUP1S) && (INTR_TYPE_NS == INTR_GROUP1NS) && @@ -204,6 +205,18 @@ void plat_ic_set_interrupt_priority(unsigned int id, unsigned int priority) { gicv3_set_interrupt_priority(id, plat_my_core_pos(), priority); } + +int plat_ic_has_interrupt_type(unsigned int type) +{ + assert((type == INTR_TYPE_EL3) || (type == INTR_TYPE_S_EL1) || + (type == INTR_TYPE_NS)); + return 1; +} + +void plat_ic_set_interrupt_type(unsigned int id, unsigned int type) +{ + gicv3_set_interrupt_type(id, plat_my_core_pos(), type); +} #endif #ifdef IMAGE_BL32 |