Unverified Commit eda9eade authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by GitHub
Browse files

Merge pull request #1340 from Andre-ARM/sec-irqs-fixes

Fix support for systems without secure interrupts
parents a54616a6 205cf6e7
...@@ -178,9 +178,6 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data) ...@@ -178,9 +178,6 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/* The platform should provide a list of secure interrupts */
assert(plat_driver_data->g0_interrupt_array);
/* /*
* If there are no interrupts of a particular type, then the * If there are no interrupts of a particular type, then the
* number of interrupts of that type should be 0 and vice-versa. * number of interrupts of that type should be 0 and vice-versa.
...@@ -195,8 +192,8 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data) ...@@ -195,8 +192,8 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
WARN("Please migrate to using an interrupt_prop_t array\n"); WARN("Please migrate to using an interrupt_prop_t array\n");
} }
#else #else
assert(plat_driver_data->interrupt_props != NULL); assert(plat_driver_data->interrupt_props_num > 0 ?
assert(plat_driver_data->interrupt_props_num > 0); plat_driver_data->interrupt_props != NULL : 1);
#endif #endif
/* Ensure that this is a GICv2 system */ /* Ensure that this is a GICv2 system */
......
...@@ -433,8 +433,7 @@ unsigned int gicv3_secure_spis_configure_props(uintptr_t gicd_base, ...@@ -433,8 +433,7 @@ unsigned int gicv3_secure_spis_configure_props(uintptr_t gicd_base,
unsigned int ctlr_enable = 0; unsigned int ctlr_enable = 0;
/* Make sure there's a valid property array */ /* Make sure there's a valid property array */
assert(interrupt_props != NULL); assert(interrupt_props_num > 0 ? interrupt_props != NULL : 1);
assert(interrupt_props_num > 0);
for (i = 0; i < interrupt_props_num; i++) { for (i = 0; i < interrupt_props_num; i++) {
current_prop = &interrupt_props[i]; current_prop = &interrupt_props[i];
...@@ -556,8 +555,7 @@ unsigned int gicv3_secure_ppi_sgi_configure_props(uintptr_t gicr_base, ...@@ -556,8 +555,7 @@ unsigned int gicv3_secure_ppi_sgi_configure_props(uintptr_t gicr_base,
unsigned int ctlr_enable = 0; unsigned int ctlr_enable = 0;
/* Make sure there's a valid property array */ /* Make sure there's a valid property array */
assert(interrupt_props != NULL); assert(interrupt_props_num > 0 ? interrupt_props != NULL : 1);
assert(interrupt_props_num > 0);
for (i = 0; i < interrupt_props_num; i++) { for (i = 0; i < interrupt_props_num; i++) {
current_prop = &interrupt_props[i]; current_prop = &interrupt_props[i];
......
...@@ -103,8 +103,8 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data) ...@@ -103,8 +103,8 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data)
WARN("Please migrate to using interrupt_prop_t arrays\n"); WARN("Please migrate to using interrupt_prop_t arrays\n");
} }
#else #else
assert(plat_driver_data->interrupt_props != NULL); assert(plat_driver_data->interrupt_props_num > 0 ?
assert(plat_driver_data->interrupt_props_num > 0); plat_driver_data->interrupt_props != NULL : 1);
#endif #endif
/* Check for system register support */ /* Check for system register support */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment