fix(interrupts): check support for ESPI before testing it
It is possible for extended range interrupts to be enabled by software
but the underlying hardware (GIC) may not support it. In such,
scenarios check if the support exists before exercising the
ESPI functionality.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: Ibdf18be8403539c0ae9204309adc8a81dd0382d3
diff --git a/include/drivers/arm/arm_gic.h b/include/drivers/arm/arm_gic.h
index 0f27dc1..528ec6e 100644
--- a/include/drivers/arm/arm_gic.h
+++ b/include/drivers/arm/arm_gic.h
@@ -7,6 +7,7 @@
#ifndef __ARM_GIC_H__
#define __ARM_GIC_H__
+#include <stdbool.h>
#include <stdint.h>
/***************************************************************************
@@ -150,4 +151,9 @@
*****************************************************************************/
void arm_gic_restore_context_global(void);
+/******************************************************************************
+ * Check if extended SPI range is implemented by GIC.
+ *****************************************************************************/
+bool arm_gic_is_espi_supported(void);
+
#endif /* __ARM_GIC_H__ */