From: Giacomo Travaglini Date: Thu, 29 Aug 2019 13:09:30 +0000 (+0100) Subject: dev-arm: Fix GICv3 IGRPMOD writes X-Git-Tag: v19.0.0.0~589 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1458b5d583f6e1eca90c2246f3f2429a02383f4;p=gem5.git dev-arm: Fix GICv3 IGRPMOD writes Writes to IGRPMOD were not right shifting the value, which resulted in interrupts having a IGRPMOD value > 1, whereas the only allowed values are 0 and 1. Change-Id: Id491bd1b184d6e5abeeea25ea272eeb91792ccf7 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20613 Maintainer: Andreas Sandberg Tested-by: kokoro --- diff --git a/src/dev/arm/gic_v3_distributor.cc b/src/dev/arm/gic_v3_distributor.cc index bae90bf6a..f85474c9c 100644 --- a/src/dev/arm/gic_v3_distributor.cc +++ b/src/dev/arm/gic_v3_distributor.cc @@ -794,7 +794,7 @@ Gicv3Distributor::write(Addr addr, uint64_t data, size_t size, for (int i = 0, int_id = first_intid; i < 8 * size && int_id < itLines; i++, int_id++) { - irqGrpmod[int_id] = data & (0x1 << i); + irqGrpmod[int_id] = bits(data, i); } return ;