dev-arm: Fix mapping between IGRPEN1_EL3 and IGRPEN1_EL1
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 21 Aug 2019 09:08:54 +0000 (10:08 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 9 Sep 2019 08:48:30 +0000 (08:48 +0000)
commit54e6625546fca51d54d79eb807c999d0756d8320
tree868219f3f8c4ee856f0fdaea1e62590a2e84c451
parent5aa85f38cb15a8bfb76eaed074f892f99dbd1c68
dev-arm: Fix mapping between IGRPEN1_EL3 and IGRPEN1_EL1

Previous mapping was wrong because it was checking which security bits
it was accessing by using the inSecureState() function, whereas it
should have used the isSecureBelowEL3().  This patch is not making the
sostitution since it is optimizing the mapping furthermore by avoiding
updating both IGRPEN1_EL1 and  IGRPEN1_EL3 on writes.  The IGRPEN1_EL1
register is used as a storage, and any reads/writes to IGRPEN1_EL3 is
routed to that register.

Change-Id: Id318ec44e19d4f844e4e3410d74d0c4f89810811
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20632
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/dev/arm/gic_v3_cpu_interface.cc