[BOOT-WRAPPER PATCH 3/3] aarch64: Enable use of GCS for EL2 and below
Mark Brown
broonie at kernel.org
Tue Nov 26 09:20:47 PST 2024
On Tue, Nov 26, 2024 at 03:39:55PM +0000, Mark Rutland wrote:
> + if (mrs_field(ID_AA64PFR1_EL1, GCS)) {
> + scr |= SCR_EL3_GCSEn;
> + msr(GCSCR_EL2, 0);
> + msr(GCSCR_EL1, 0);
> + msr(GCSCRE0_EL1, 0);
> + }
> +
We're not doing anything for GCSCR_EL3 where (as for the other ELs)
RVCHKEN resets to an architecturally UNKNOWN value:
https://developer.arm.com/documentation/ddi0601/2024-09/AArch64-Registers/GCSCR-EL3--Guarded-Control-Stack-Control-Register--EL3-?lang=en
This is also an oversight in the TF-A GCS support. One might question
the decisions of an implementation which doesn't reset it to 0 but it
should be safer to initialise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241126/694d7f37/attachment.sig>
More information about the linux-arm-kernel
mailing list