dev-arm: Writing ICENABLER for non-SPIs is RAZ/WI (or RES0)
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 8 Mar 2019 10:47:02 +0000 (10:47 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 27 Mar 2019 13:29:10 +0000 (13:29 +0000)
For SGIs and PPIs:
* When ARE is 1 (only value supported in gem5) for the Security state of
an interrupt, the field for that interrupt is RES0 and an implementation
is permitted to make the field RAZ/WI in this case.

Change-Id: I6da2a89b1c848d458f42540e0113e7139b910abb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17630
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/dev/arm/gic_v3_distributor.cc

index 148de5a19298c4dc574739a23f4e671a15149670..f261b295b3dfa71dcf1b43c157c330e58ca4f1b3 100644 (file)
@@ -578,6 +578,10 @@ Gicv3Distributor::write(Addr addr, uint64_t data, size_t size,
         // Interrupt Clear-Enable Registers
         int first_intid = (addr - GICD_ICENABLER.start()) * 8;
 
+        if (isNotSPI(first_intid)) {
+            return;
+        }
+
         for (int i = 0, int_id = first_intid; i < 8 * size && int_id < itLines;
              i++, int_id++) {