arm-trusted-firmware/include/lib/el3_runtime
Jayanth Dodderi Chidanand f74cb0be8a fix(amu): fault handling on EL2 context switch
The HAFGRTR_EL2 register is UNDEFINED unless the CPU supports both
FEAT_FGT and FEAT_AMUv1. FEAT_FGT is mandatory for v8.6-A and upwards,
but FEAT_AMUv1 is optional (from v8.4-A upwards), and as such any
8.6-A cores today without support for FEAT_AMUv1 will trigger an
undefined instruction exception on accessing this register.

Currently ARM_ARCH_AT_LEAST macro has been used to associate with an
architecture extension allowing to access HAFGRTR_EL2 register. This
condition should be replaced with macros specific to individual
features. This patch adds a new set of macros "ENABLE_FEAT_FGT,
ENABLE_FEAT_AMUv1, ENABLE_FEAT_ECV" under build options to provide
controlled access to the HAFGRTR_EL2 register.

Further to ensure that the the build options passed comply
with the given hardware implementation, a feature detection mechanism,
checking whether build options match with the architecture is required
at bootime. This will be implemented and pushed later in a separate
patch.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ie390f4babe233b8b09455290277edbddecd33ead
2021-12-10 12:33:51 +00:00
..
aarch32 coverity: fix MISRA violations 2020-02-18 10:47:46 -06:00
aarch64 fix(amu): fault handling on EL2 context switch 2021-12-10 12:33:51 +00:00
context_mgmt.h include: fixup 'cm_setup_context' prototype 2020-04-01 14:46:42 -07:00
cpu_data.h feat(rme): add context management changes for FEAT_RME 2021-10-05 18:41:35 +02:00
pubsub.h Merge pull request #1751 from vwadekar/tegra-scatter-file-support 2019-03-01 11:23:58 +00:00
pubsub_events.h Switch AARCH32/AARCH64 to __aarch64__ 2019-08-01 13:45:03 -07:00