]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
aarch64: Support for FEAT_RME_GPC3
authorEzra Sitorus <ezra.sitorus@arm.com>
Fri, 2 May 2025 17:08:21 +0000 (18:08 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Mon, 12 May 2025 16:07:53 +0000 (17:07 +0100)
FEAT_RME_GPC3 - RME Granule Protection Check 3 Extension - introduces
a method for defining a set of windows in the memory map for which
Granule Protection Checks are skipped, and instead applies a set of
default settings associated with the window.

This patch introduces the sysreg gpcbw_el3. Add -march=armv9.5-a to
access this sysreg since this feature is optional from armv9.5-a.

gas/testsuite/gas/aarch64/gpc3.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/gpc3.s [new file with mode: 0644]
opcodes/aarch64-sys-regs.def

diff --git a/gas/testsuite/gas/aarch64/gpc3.d b/gas/testsuite/gas/aarch64/gpc3.d
new file mode 100644 (file)
index 0000000..2535aef
--- /dev/null
@@ -0,0 +1,11 @@
+#name: RME_GPC3 System register
+#as: -march=armv9.5-a
+#objdump: -dr
+
+.*:     file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+[^:]*: d53e21a0        mrs     x0, gpcbw_el3
+[^:]*: d51e21a0        msr     gpcbw_el3, x0
diff --git a/gas/testsuite/gas/aarch64/gpc3.s b/gas/testsuite/gas/aarch64/gpc3.s
new file mode 100644 (file)
index 0000000..349cc08
--- /dev/null
@@ -0,0 +1,7 @@
+/* RME Granule Protection Check 3 Extension.  */
+
+       /* Read from system register.  */
+       mrs x0, gpcbw_el3
+
+       /* Write to system register.  */
+       msr gpcbw_el3, x0
index c1b07c710f869a24589f2720705ea85fd5a70969..9713ff08d1af06ef619ddb4da28f74ce21a8df11 100644 (file)
   SYSREG ("gcscr_el3",         CPENC (3,6,2,5,0),      F_ARCHEXT,              AARCH64_FEATURE (GCS))
   SYSREG ("gcr_el1",           CPENC (3,0,1,0,6),      F_ARCHEXT,              AARCH64_FEATURE (MEMTAG))
   SYSREG ("gmid_el1",          CPENC (3,1,0,0,4),      F_REG_READ|F_ARCHEXT,   AARCH64_FEATURE (MEMTAG))
+  SYSREG ("gpcbw_el3",         CPENC (3,6,2,1,5),      F_ARCHEXT,              AARCH64_FEATURE (V9_5A))
   SYSREG ("gpccr_el3",         CPENC (3,6,2,1,6),      0,                      AARCH64_NO_FEATURES)
   SYSREG ("gptbr_el3",         CPENC (3,6,2,1,4),      0,                      AARCH64_NO_FEATURES)
   SYSREG ("hacr_el2",          CPENC (3,4,1,1,7),      0,                      AARCH64_NO_FEATURES)