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 | eb68ea9b10c190c237216dee92166f9e7b2ce3d4 (patch) | |
tree | a33f06ca92514ec2ccfd96b1f3b8449dd0244fc5 /plat/common | |
parent | 8ac544e44b9747c1c59b42e4708607f2e8077c6f (diff) |
GIC: Add API to get running priority
Document the API in separate platform interrupt controller API document.
Change-Id: If18f208e10a8a243f5c59d226fcf48e985941949
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/plat_gicv2.c | 9 | ||||
-rw-r--r-- | plat/common/plat_gicv3.c | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/plat/common/plat_gicv2.c b/plat/common/plat_gicv2.c index 50a81818..1be693bb 100644 --- a/plat/common/plat_gicv2.c +++ b/plat/common/plat_gicv2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,6 +20,8 @@ #pragma weak plat_ic_end_of_interrupt #pragma weak plat_interrupt_type_to_line +#pragma weak plat_ic_get_running_priority + /* * This function returns the highest priority pending interrupt at * the Interrupt controller @@ -122,3 +124,8 @@ uint32_t plat_interrupt_type_to_line(uint32_t type, return ((gicv2_is_fiq_enabled()) ? __builtin_ctz(SCR_FIQ_BIT) : __builtin_ctz(SCR_IRQ_BIT)); } + +unsigned int plat_ic_get_running_priority(void) +{ + return gicv2_get_running_priority(); +} diff --git a/plat/common/plat_gicv3.c b/plat/common/plat_gicv3.c index 030a1d90..02317f1d 100644 --- a/plat/common/plat_gicv3.c +++ b/plat/common/plat_gicv3.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -26,6 +26,8 @@ #pragma weak plat_ic_end_of_interrupt #pragma weak plat_interrupt_type_to_line +#pragma weak plat_ic_get_running_priority + CASSERT((INTR_TYPE_S_EL1 == INTR_GROUP1S) && (INTR_TYPE_NS == INTR_GROUP1NS) && (INTR_TYPE_EL3 == INTR_GROUP0), assert_interrupt_type_mismatch); @@ -155,6 +157,12 @@ uint32_t plat_interrupt_type_to_line(uint32_t type, return __builtin_ctz(SCR_FIQ_BIT); } } + +unsigned int plat_ic_get_running_priority(void) +{ + return gicv3_get_running_priority(); +} + #endif #ifdef IMAGE_BL32 |