mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_BRBE to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_BRBE_FOR_NS=2), by splitting is_feat_brbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access BRBE related registers. The FVP platform decided to compile in support unconditionally (=1), even though FEAT_BRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime. Change-Id: I5f2e2c9648300f65f0fa9a5f8e2f34e73529d053 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
f5360cfa81
commit
ff49103660
6 changed files with 32 additions and 31 deletions
|
@ -248,16 +248,6 @@ static void read_feat_rme(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
* Feature : FEAT_BRBE (Branch Record Buffer Extension)
|
||||
*****************************************************/
|
||||
static void read_feat_brbe(void)
|
||||
{
|
||||
#if (ENABLE_BRBE_FOR_NS == FEAT_STATE_ALWAYS)
|
||||
feat_detect_panic(is_feat_brbe_present(), "BRBE");
|
||||
#endif
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* Feature : FEAT_RNG_TRAP (Trapping support for RNDR/RNDRRS)
|
||||
*****************************************************************/
|
||||
|
@ -334,7 +324,8 @@ void detect_arch_features(void)
|
|||
check_feature(ENABLE_FEAT_HCX, read_feat_hcx_id_field(), "HCX", 1, 1);
|
||||
|
||||
/* v9.0 features */
|
||||
read_feat_brbe();
|
||||
check_feature(ENABLE_BRBE_FOR_NS, read_feat_brbe_id_field(),
|
||||
"BRBE", 1, 2);
|
||||
check_feature(ENABLE_TRBE_FOR_NS, read_feat_trbe_id_field(),
|
||||
"TRBE", 1, 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue