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)
Thu, Apr 13, 2023 9:09 PM

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

(

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69682
Reviewed-by: Giacomo Travaglini giacomo.travaglini@arm.com
Maintainer: Giacomo Travaglini giacomo.travaglini@arm.com
Tested-by: kokoro noreply+kokoro@google.com

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

Approvals:
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc
index e60daf0..b42b49c 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: 3
Gerrit-Owner: Richard Cooper richard.cooper@arm.com
Gerrit-Reviewer: Andreas Sandberg andreas.sandberg@arm.com
Gerrit-Reviewer: Giacomo Travaglini giacomo.travaglini@arm.com
Gerrit-Reviewer: Richard Cooper richard.cooper@arm.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-MessageType: merged

Richard Cooper has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69682?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69682 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com> --- M src/dev/arm/gic_v2.cc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc index e60daf0..b42b49c 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: 3 Gerrit-Owner: Richard Cooper <richard.cooper@arm.com> Gerrit-Reviewer: Andreas Sandberg <andreas.sandberg@arm.com> Gerrit-Reviewer: Giacomo Travaglini <giacomo.travaglini@arm.com> Gerrit-Reviewer: Richard Cooper <richard.cooper@arm.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com> Gerrit-MessageType: merged