-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Closed
Copy link
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: ARMARM (32-bit) ArchitectureARM (32-bit) Architecturearea: Interrupt Controller
Description
Problem description:
In file “Kconfig.defconfig.viper_bcm58402_a72” defined NUM_IRQS as 240. It the same time GIC may rise some special purpose interrupts in range 1020 up to 1023. These vectors are out of _sw_isr_table and it case to invoking of wrong function.
I propose to check
- GIC rises interrupt that is less than CONFIG_NUM_IRQS
- Pointer to ISR is not NULL.
For example, I added some lines to isr_wrapper.S as following
stp x0, x1, [sp, #-16]!
cmp x0, #CONFIG_NUM_IRQS // new line
b.hi spr // new line
lsl x0, x0, #4 /* table is 16-byte wide */
/* Retrieve the interrupt service routine */
ldr x1, =_sw_isr_table
add x1, x1, x0
ldp x0, x3, [x1] /* arg in x0, ISR in x3 */
cmp x3, #0x0 // new line
b.eq spr // new line
/*
* Call the ISR. Unmask and mask again the IRQs to support nested
* exception handlers
*/
msr daifclr, #(DAIFSET_IRQ)
blr x3
msr daifset, #(DAIFSET_IRQ)
spr: // new line
/* Signal end-of-interrupt */
ldp x0, x1, [sp], #16
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: ARMARM (32-bit) ArchitectureARM (32-bit) Architecturearea: Interrupt Controller