gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: dev-arm: Fix writes to Arm GICv2 GICD_IGROUPRn

RC
Richard Cooper (Gerrit)
Wed, Apr 12, 2023 7:41 AM

Richard Cooper has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69682?usp=email )

Change subject: dev-arm: Fix writes to Arm GICv2 GICD_IGROUPRn
......................................................................

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

M src/dev/arm/gic_v2.cc
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc
index 6def222..e0e92ac 100644
--- a/src/dev/arm/gic_v2.cc
+++ b/src/dev/arm/gic_v2.cc
@@ -509,7 +509,7 @@
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;
    }
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69682?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia5f17d05530263d7e918ff33576daaf8165c25c2
Gerrit-Change-Number: 69682
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Cooper richard.cooper@arm.com
Gerrit-MessageType: newchange

Richard Cooper has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69682?usp=email ) Change subject: dev-arm: Fix writes to Arm GICv2 GICD_IGROUPRn ...................................................................... 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 --- M src/dev/arm/gic_v2.cc 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc index 6def222..e0e92ac 100644 --- a/src/dev/arm/gic_v2.cc +++ b/src/dev/arm/gic_v2.cc @@ -509,7 +509,7 @@ 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; } -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69682?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ia5f17d05530263d7e918ff33576daaf8165c25c2 Gerrit-Change-Number: 69682 Gerrit-PatchSet: 1 Gerrit-Owner: Richard Cooper <richard.cooper@arm.com> Gerrit-MessageType: newchange