mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 17:14:21 +00:00
Enable support for EL3 interrupt in IMF
This patch enables support for EL3 interrupts in the Interrupt Management Framework (IMF) of ARM Trusted Firmware. Please note that although the registration of the EL3 interrupt type is now supported, it has not been tested on any of the ARM Standard platforms. Change-Id: If4dcdc7584621522a2f3ea13ea9b1ad0a76bb8a1
This commit is contained in:
parent
27573c59a6
commit
4e0e0f44f1
2 changed files with 20 additions and 12 deletions
|
@ -67,18 +67,15 @@ typedef struct intr_type_desc {
|
|||
static intr_type_desc_t intr_type_descs[MAX_INTR_TYPES];
|
||||
|
||||
/*******************************************************************************
|
||||
* This function validates the interrupt type. EL3 interrupts are currently not
|
||||
* supported.
|
||||
* This function validates the interrupt type.
|
||||
******************************************************************************/
|
||||
static int32_t validate_interrupt_type(uint32_t type)
|
||||
{
|
||||
if (type == INTR_TYPE_EL3)
|
||||
return -ENOTSUP;
|
||||
if (type == INTR_TYPE_S_EL1 || type == INTR_TYPE_NS ||
|
||||
type == INTR_TYPE_EL3)
|
||||
return 0;
|
||||
|
||||
if (type != INTR_TYPE_S_EL1 && type != INTR_TYPE_NS)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -95,6 +92,9 @@ static int32_t validate_routing_model(uint32_t type, uint32_t flags)
|
|||
if (type == INTR_TYPE_NS)
|
||||
return validate_ns_interrupt_rm(flags);
|
||||
|
||||
if (type == INTR_TYPE_EL3)
|
||||
return validate_el3_interrupt_rm(flags);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,10 @@
|
|||
#define INTR_NS_VALID_RM0 0x0
|
||||
/* Routed to EL1/EL2 from NS and to EL3 from Secure */
|
||||
#define INTR_NS_VALID_RM1 0x1
|
||||
/* Routed to EL3 from NS. Taken to S-EL1 from Secure and handed over to EL3 */
|
||||
#define INTR_EL3_VALID_RM0 0x2
|
||||
/* Routed to EL3 from NS and Secure */
|
||||
#define INTR_EL3_VALID_RM1 0x3
|
||||
/* This is the default routing model */
|
||||
#define INTR_DEFAULT_RM 0x0
|
||||
|
||||
|
@ -87,12 +91,16 @@
|
|||
* of interrupt. If the model does not match one of the valid masks
|
||||
* -EINVAL is returned.
|
||||
******************************************************************************/
|
||||
#define validate_sel1_interrupt_rm(x) (x == INTR_SEL1_VALID_RM0 ? 0 : \
|
||||
(x == INTR_SEL1_VALID_RM1 ? 0 :\
|
||||
#define validate_sel1_interrupt_rm(x) ((x) == INTR_SEL1_VALID_RM0 ? 0 : \
|
||||
((x) == INTR_SEL1_VALID_RM1 ? 0 :\
|
||||
-EINVAL))
|
||||
|
||||
#define validate_ns_interrupt_rm(x) (x == INTR_NS_VALID_RM0 ? 0 : \
|
||||
(x == INTR_NS_VALID_RM1 ? 0 :\
|
||||
#define validate_ns_interrupt_rm(x) ((x) == INTR_NS_VALID_RM0 ? 0 : \
|
||||
((x) == INTR_NS_VALID_RM1 ? 0 :\
|
||||
-EINVAL))
|
||||
|
||||
#define validate_el3_interrupt_rm(x) ((x) == INTR_EL3_VALID_RM0 ? 0 : \
|
||||
((x) == INTR_EL3_VALID_RM1 ? 0 :\
|
||||
-EINVAL))
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue