arm-trusted-firmware/include/arch/aarch32
Andre Przywara 19d52a83b7 feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA
Armv8.6 introduced the FEAT_LS64 extension, which provides a 64 *byte*
store instruction. A related instruction is ST64BV0, which will replace
the lowest 32 bits of the data with a value taken from the ACCDATA_EL1
system register (so that EL0 cannot alter them).
Using that ST64BV0 instruction and accessing the ACCDATA_EL1 system
register is guarded by two SCR_EL3 bits, which we should set to avoid a
trap into EL3, when lower ELs use one of those.

Add the required bits and pieces to make this feature usable:
- Add the ENABLE_FEAT_LS64_ACCDATA build option (defaulting to 0).
- Add the CPUID and SCR_EL3 bit definitions associated with FEAT_LS64.
- Add a feature check to check for the existing four variants of the
  LS64 feature and detect future extensions.
- Add code to save and restore the ACCDATA_EL1 register on
  secure/non-secure context switches.
- Enable the feature with runtime detection for FVP and Arm FPGA.

Please note that the *basic* FEAT_LS64 feature does not feature any trap
bits, it's only the addition of the ACCDATA_EL1 system register that
adds these traps and the SCR_EL3 bits.

Change-Id: Ie3e2ca2d9c4fbbd45c0cc6089accbb825579138a
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-11-06 16:52:12 +01:00
..
arch.h feat(d128): add support for FEAT_D128 2024-10-24 14:51:55 -05:00
arch_features.h feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA 2024-11-06 16:52:12 +01:00
arch_helpers.h feat(dsu): save/restore DSU PMU register 2024-05-09 10:20:32 -05:00
asm_macros.S refactor(build): introduce adr_l macro 2024-05-03 14:08:13 +02:00
assert_macros.S Reorganize architecture-dependent header files 2019-01-04 10:43:16 +00:00
console_macros.S refactor(console): disable getc() by default 2023-10-11 08:40:14 +02:00
el3_common_macros.S chore: simplify the macro names in ENABLE_FEAT mechanism 2024-05-02 08:53:01 -05:00
smccc_helpers.h style: remove useless trailing semicolon and line continuations 2023-03-09 14:59:08 +01:00
smccc_macros.S aarch32: stop speculative execution past exception returns 2020-03-01 06:44:30 -06:00