diff options
author | Juan Pablo Conde <juanpablo.conde@arm.com> | 2022-07-12 16:40:29 -0400 |
---|---|---|
committer | Juan Pablo Conde <juanpablo.conde@arm.com> | 2022-08-18 15:53:54 -0400 |
commit | ff86e0b4e6c34d28b8642dd8eb9cbdd517bad195 (patch) | |
tree | 3bd2509c4c468311bc6844e9428b00de3aa9f0aa /common | |
parent | 17e76b5eb7901534ff9ee3f62b9990ba6038b002 (diff) | |
download | arm-trusted-firmware-ff86e0b4e6c34d28b8642dd8eb9cbdd517bad195.tar.gz |
feat(rng-trap): add EL3 support for FEAT_RNG_TRAP
FEAT_RNG_TRAP introduces support for EL3 trapping of reads of the
RNDR and RNDRRS registers, which is enabled by setting the
SCR_EL3.TRNDR bit. This patch adds a new build flag
ENABLE_FEAT_RNG_TRAP that enables the feature.
This feature is supported only in AArch64 state from Armv8.5 onwards.
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: Ia9f17aef3444d3822bf03809036a1f668c9f2d89
Diffstat (limited to 'common')
-rw-r--r-- | common/feat_detect.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/feat_detect.c b/common/feat_detect.c index be3e20e6f..ee3458865 100644 --- a/common/feat_detect.c +++ b/common/feat_detect.c @@ -254,6 +254,16 @@ static void read_feat_trbe(void) #endif } +/****************************************************************** + * Feature : FEAT_RNG_TRAP (Trapping support for RNDR/RNDRRS) + *****************************************************************/ +static void read_feat_rng_trap(void) +{ +#if (ENABLE_FEAT_RNG_TRAP == FEAT_STATE_1) + feat_detect_panic(is_feat_rng_trap_present(), "RNG_TRAP"); +#endif +} + /*********************************************************************************** * TF-A supports many Arm architectural features starting from arch version * (8.0 till 8.7+). These features are mostly enabled through build flags. This @@ -304,6 +314,7 @@ void detect_arch_features(void) read_feat_mte(); read_feat_rng(); read_feat_bti(); + read_feat_rng_trap(); /* v8.6 features */ read_feat_amuv1p1(); |