Skip to content

fix(gic): use correct distributor registers for ESPI enable and routing - #656

Merged
chetan-rathore merged 1 commit into
ARM-software:release/sbsa/v8.0.3from
chetan-rathore:latest-8.0.3
Oct 23, 2026
Merged

chetan-rathore merged 1 commit into
ARM-software:release/sbsa/v8.0.3from
chetan-rathore:latest-8.0.3

Conversation

@chetan-rathore

Copy link
Copy Markdown
Contributor

Extended SPI (ESPI) support in the GICv3 driver had two register addressing bugs:

  1. v3_enable_extended_interrupt_source() wrote to GICD_ICENABLERE (Clear-Enable) instead of GICD_ISENABLERE (Set-Enable). As a result, attempting to enable an ESPI source would clear/disable it. Define GICD_ISENABLERE (0x1200) in acs_gic.h and write to it when enabling ESPI.

  2. v3_route_extended_interrupt() programmed GICD_IROUTERn (0x6000, legacy SPI range) and did not subtract EXTENDED_SPI_START_INTID (4096) from int_id, writing to an incorrect offset well past the distributor routing space. Route ESPIs through GICD_IROUTERnE (0x8000) using the 0-based ESPI index (int_id - EXTENDED_SPI_START_INTID).

Fixes #605

Extended SPI (ESPI) support in the GICv3 driver had two register addressing bugs:

1. v3_enable_extended_interrupt_source() wrote to GICD_ICENABLERE
   (Clear-Enable) instead of GICD_ISENABLERE (Set-Enable). As a result,
   attempting to enable an ESPI source would clear/disable it.
   Define GICD_ISENABLERE (0x1200) in acs_gic.h and write to it when enabling ESPI.

2. v3_route_extended_interrupt() programmed GICD_IROUTERn (0x6000, legacy SPI
   range) and did not subtract EXTENDED_SPI_START_INTID (4096) from int_id,
   writing to an incorrect offset well past the distributor routing space.
   Route ESPIs through GICD_IROUTERnE (0x8000) using the 0-based ESPI index
   (int_id - EXTENDED_SPI_START_INTID).

Fixes ARM-software#605

Signed-off-by: La1itchauhan <chauhanlalitofficial@gmail.com>
@chetan-rathore
chetan-rathore merged commit 0653a1b into ARM-software:release/sbsa/v8.0.3 Oct 23, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants