From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: binutils@sourceware.org, rearnsha@arm.com, richard.sandiford@arm.com
Subject: Re: [PATCH 3/6] aarch64: Allow writes to MFAR_EL3
Date: Tue, 30 Nov 2021 13:27:45 +0000 [thread overview]
Message-ID: <b424d231-5c30-07f1-cc89-6035aecfe5a7@foss.arm.com> (raw)
In-Reply-To: <mptlf153kak.fsf@arm.com>
On 30/11/2021 12:22, Richard Sandiford via Binutils wrote:
> MFAR_EL3 is a read/write register, but was incorrectly marked as
> read-only
> [https://developer.arm.com/documentation/ddi0601/2021-09/AArch64-Registers/MFAR-EL3--PA-Fault-Address-Register?lang=en]
>
> Tested on aarch64-linux-gnu. OK to install?
>
OK.
R.
> Richard
>
>
> opcodes/
> * aarch64-opc.c (aarch64_sys_regs): Mark mfar_el3 as read-write.
>
> gas/
> * testsuite/gas/aarch64/rme.s: Test writing to mfar_el3.
> * testsuite/gas/aarch64/rme.d: Update accordingly.
> * testsuite/gas/aarch64/rme-invalid.s: Delete.
> * testsuite/gas/aarch64/rme-invalid.l: Likewise.
> * testsuite/gas/aarch64/rme-invalid.d: Likewise.
> ---
> gas/testsuite/gas/aarch64/rme-invalid.d | 3 ---
> gas/testsuite/gas/aarch64/rme-invalid.l | 2 --
> gas/testsuite/gas/aarch64/rme-invalid.s | 4 ----
> gas/testsuite/gas/aarch64/rme.d | 23 ++++++++++++-----------
> gas/testsuite/gas/aarch64/rme.s | 1 +
> opcodes/aarch64-opc.c | 2 +-
> 6 files changed, 14 insertions(+), 21 deletions(-)
> delete mode 100644 gas/testsuite/gas/aarch64/rme-invalid.d
> delete mode 100644 gas/testsuite/gas/aarch64/rme-invalid.l
> delete mode 100644 gas/testsuite/gas/aarch64/rme-invalid.s
>
> diff --git a/gas/testsuite/gas/aarch64/rme-invalid.d b/gas/testsuite/gas/aarch64/rme-invalid.d
> deleted file mode 100644
> index 091f40c6980..00000000000
> --- a/gas/testsuite/gas/aarch64/rme-invalid.d
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -#name: Invalid RME System registers usage
> -#source: rme-invalid.s
> -#warning_output: rme-invalid.l
> diff --git a/gas/testsuite/gas/aarch64/rme-invalid.l b/gas/testsuite/gas/aarch64/rme-invalid.l
> deleted file mode 100644
> index 7a9e3b22a3a..00000000000
> --- a/gas/testsuite/gas/aarch64/rme-invalid.l
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -.*: Assembler messages:
> -.*: Warning: specified register cannot be written to at operand 1 -- `msr mfar_el3,x0'
> diff --git a/gas/testsuite/gas/aarch64/rme-invalid.s b/gas/testsuite/gas/aarch64/rme-invalid.s
> deleted file mode 100644
> index d19ac9ca57a..00000000000
> --- a/gas/testsuite/gas/aarch64/rme-invalid.s
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -/* Realm Management Extension. */
> -
> -/* Illegal write to RME system registers. */
> -msr mfar_el3, x0
> diff --git a/gas/testsuite/gas/aarch64/rme.d b/gas/testsuite/gas/aarch64/rme.d
> index a714b78c346..e46339ff901 100644
> --- a/gas/testsuite/gas/aarch64/rme.d
> +++ b/gas/testsuite/gas/aarch64/rme.d
> @@ -7,14 +7,15 @@ Disassembly of section \.text:
>
> 0+ <.*>:
>
> - 0: d53e60a0 mrs x0, mfar_el3
> - 4: d53e21c0 mrs x0, gpccr_el3
> - 8: d53e2180 mrs x0, gptbr_el3
> - c: d51e21c0 msr gpccr_el3, x0
> - 10: d51e2180 msr gptbr_el3, x0
> - 14: d50e7e20 dc cipapa, x0
> - 18: d50e7ea0 dc cigdpapa, x0
> - 1c: d50e8460 tlbi rpaos, x0
> - 20: d50e84e0 tlbi rpalos, x0
> - 24: d50e819f tlbi paallos
> - 28: d50e879f tlbi paall
> +[^:]*: d53e60a0 mrs x0, mfar_el3
> +[^:]*: d53e21c0 mrs x0, gpccr_el3
> +[^:]*: d53e2180 mrs x0, gptbr_el3
> +[^:]*: d51e60a0 msr mfar_el3, x0
> +[^:]*: d51e21c0 msr gpccr_el3, x0
> +[^:]*: d51e2180 msr gptbr_el3, x0
> +[^:]*: d50e7e20 dc cipapa, x0
> +[^:]*: d50e7ea0 dc cigdpapa, x0
> +[^:]*: d50e8460 tlbi rpaos, x0
> +[^:]*: d50e84e0 tlbi rpalos, x0
> +[^:]*: d50e819f tlbi paallos
> +[^:]*: d50e879f tlbi paall
> diff --git a/gas/testsuite/gas/aarch64/rme.s b/gas/testsuite/gas/aarch64/rme.s
> index 21d9bd2deeb..d35687be992 100644
> --- a/gas/testsuite/gas/aarch64/rme.s
> +++ b/gas/testsuite/gas/aarch64/rme.s
> @@ -6,6 +6,7 @@ mrs x0, gpccr_el3
> mrs x0, gptbr_el3
>
> /* Write to RME system registers. */
> +msr mfar_el3, x0
> msr gpccr_el3, x0
> msr gptbr_el3, x0
>
> diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
> index 372101a86a7..34b141eaed0 100644
> --- a/opcodes/aarch64-opc.c
> +++ b/opcodes/aarch64-opc.c
> @@ -4833,7 +4833,7 @@ const aarch64_sys_reg aarch64_sys_regs [] =
>
> SR_CORE ("accdata_el1", CPENC (3,0,C13,C0,5), 0),
>
> - SR_CORE ("mfar_el3", CPENC (3,6,C6,C0,5), F_REG_READ),
> + SR_CORE ("mfar_el3", CPENC (3,6,C6,C0,5), 0),
> SR_CORE ("gpccr_el3", CPENC (3,6,C2,C1,6), 0),
> SR_CORE ("gptbr_el3", CPENC (3,6,C2,C1,4), 0),
>
>
prev parent reply other threads:[~2021-11-30 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 12:22 Richard Sandiford
2021-11-30 13:27 ` Richard Earnshaw [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b424d231-5c30-07f1-cc89-6035aecfe5a7@foss.arm.com \
--to=richard.earnshaw@foss.arm.com \
--cc=binutils@sourceware.org \
--cc=rearnsha@arm.com \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).