arm-trusted-firmware/common
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
..
aarch32 refactor(aarch64): rename do_panic and el3_panic 2023-02-21 17:26:01 +00:00
aarch64 refactor(bl31): use elx_panic for sysreg_handler64 2023-02-22 17:24:17 +00:00
backtrace fix(debug): decouple "get_el_str()" from backtrace 2022-11-08 10:10:19 +00:00
bl_common.c refactor(bl): remove un-necessary variable 2024-10-14 17:49:37 +01:00
desc_image_load.c SPMD: extract SPMC DTB header size from SPMD 2020-05-13 08:08:39 +02:00
fdt_fixup.c fix(fdt): reserved memory: detect existing region 2024-08-30 11:14:55 +02:00
fdt_wrappers.c feat(fdt-wrappers): add function to read uint64 with default value 2024-09-20 14:54:44 +02:00
fdt_wrappers.mk build(fdt-wrappers): introduce FDT wrappers makefile 2021-10-26 12:14:28 +01:00
feat_detect.c feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA 2024-11-06 16:52:12 +01:00
image_decompress.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
runtime_svc.c Remove support for the SMC Calling Convention 2.0 2019-01-30 16:01:49 +00:00
tf_crc32.c refactor(hw_crc32): renamed hw_crc32 to tf_crc32 2021-08-02 17:15:41 +01:00
tf_log.c feat(common/debug): add new macro ERROR_NL() to print just a newline 2021-07-21 00:01:06 +02:00
uuid.c fix(uuid): add missing #include directives 2023-04-17 16:13:16 +01:00