target/arm/ptw.c: Add GDI spaces to the granule protection case
System Agent, Non-secure Protected and two other GPI field encodings. These are explicitly denied access for any processing element when the relevant GPCCR bit is set, and reserved values when the relevant GPCCR bit is zero. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org> Message-id: 20260421-jmac-feat_rme_gdi-v3-3-ecd20c77eae1@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Jim MacArthur committed
May 5, 2026 at 09:25 UTC
6f34bbbb0ee60731c36e61d852635c3413a7be76
1 file changed
+20
target/arm/ptw.c
+20
@@ -510,6 +510,26 @@ bool arm_granule_protection_check(ARMGranuleProtectionConfig config,
510
break;
511
case 0b1111: /* all access */
512
return true;
513
+ case 0b0100: /* system agent only */
514
+ if (FIELD_EX64(gpccr, GPCCR, SA) == 0) {
515
+ goto fault_walk;
516
+ }
517
+ break;
518
+ case 0b0101: /* non-secure protected */
519
+ if (FIELD_EX64(gpccr, GPCCR, NSP) == 0) {
520
+ goto fault_walk;
521
+ }
522
+ break;
523
+ case 0b0110: /* reserved if NA6==0, otherwise no access */
524
+ if (FIELD_EX64(gpccr, GPCCR, NA6) == 0) {
525
+ goto fault_walk;
526
+ }
527
+ break;
528
+ case 0b0111: /* reserved if NA7==0, otherwise no access */
529
+ if (FIELD_EX64(gpccr, GPCCR, NA7) == 0) {
530
+ goto fault_walk;
531
+ }
532
+ break;
533
case 0b1000: /* secure */
534
if (!config.support_sel2) {
535
goto fault_walk;