From ed9effca73175a15c05c49698d0339a52c3886eb Mon Sep 17 00:00:00 2001 From: Richard Cooper Date: Thu, 8 Sep 2022 18:10:44 +0100 Subject: [PATCH] dev-arm: Fix writes to Arm GICv2 GICD_IGROUPRn Writes to the GICD_IGROUPRn registers are currently applied using the `|=` operator, allowing bits to be set but not cleared. According to the specification [1] this register should allow direct writes. This patch changes the logic to write the new value directly to the register. [1] https://developer.arm.com/documentation/ihi0048/latest/ Change-Id: Ia5f17d05530263d7e918ff33576daaf8165c25c2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69682 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- src/dev/arm/gic_v2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc index e60daf08bd..b42b49c6e3 100644 --- a/src/dev/arm/gic_v2.cc +++ b/src/dev/arm/gic_v2.cc @@ -509,7 +509,7 @@ GicV2::writeDistributor(ContextID ctx, Addr daddr, uint32_t data, DPRINTF(GIC, "gic distributor write GICD_IGROUPR%d (%#x) size %#x value %#x \n", ix, daddr, data_sz, data); - getIntGroup(ctx, ix) |= data; + getIntGroup(ctx, ix) = data; return; }