arm-trusted-firmware/make_helpers
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
..
tbbr fix(tbbr): unrecognised 'tos-fw-key-cert' option 2023-09-07 11:14:52 +01:00
toolchains build: make Poetry optional 2024-09-26 14:23:20 +00:00
arch_features.mk feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA 2024-11-06 16:52:12 +01:00
armv7-a-cpus.mk refactor(build): merge march32/64 directives 2023-06-22 16:37:03 -05:00
build-rules.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
build_env.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
build_macros.mk Merge changes from topic "romlib-fixes" into integration 2024-08-17 10:09:06 +02:00
common.mk build: unify verbosity handling 2024-06-14 15:54:48 +00:00
cygwin.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
defaults.mk feat(rmmd): el3 token sign during attestation 2024-10-15 08:20:28 -07:00
march.mk build: skip toolchain detection for some targets 2024-05-14 15:41:15 +00:00
msys.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_helpers.mk feat(build): add ability to define platform specific defaults 2024-09-17 21:44:39 +03:00
toolchain.mk build: make Poetry optional 2024-09-26 14:23:20 +00:00
unix.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
utilities.mk build: fix grouped targets on Make <= 4.2 2024-10-28 12:10:36 +00:00
windows.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00