From c1458b5d583f6e1eca90c2246f3f2429a02383f4 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 29 Aug 2019 14:09:30 +0100 Subject: [PATCH] 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 --- src/dev/arm/gic_v3_distributor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ; -- 2.30.2