mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 10:08:47 +00:00
refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED
At the moment we only support FEAT_RAS to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (FEAT_RAS=2), by splitting is_armv8_2_feat_ras_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 RAS related registers. Also move the context saving code from assembly to C, and use the new is_feat_ras_supported() function to guard its execution. Change the FVP platform default to the now supported dynamic option (=2), so the right decision can be made by the code at runtime. Change-Id: I30498f72fd80b136850856244687400456a03d0e Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
This commit is contained in:
parent
9202d51990
commit
6503ff2910
9 changed files with 44 additions and 59 deletions
|
@ -60,16 +60,6 @@ check_feature(int state, unsigned long field, const char *feat_name,
|
|||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Feature : FEAT_RAS (Reliability, Availability, and Serviceability Extension)
|
||||
******************************************************************************/
|
||||
static void read_feat_ras(void)
|
||||
{
|
||||
#if (ENABLE_FEAT_RAS == FEAT_STATE_ALWAYS)
|
||||
feat_detect_panic(is_armv8_2_feat_ras_present(), "RAS");
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************************************
|
||||
* Feature : FEAT_PAUTH (Pointer Authentication)
|
||||
***********************************************/
|
||||
|
@ -160,9 +150,9 @@ void detect_arch_features(void)
|
|||
check_feature(ENABLE_FEAT_VHE, read_feat_vhe_id_field(), "VHE", 1, 1);
|
||||
|
||||
/* v8.2 features */
|
||||
read_feat_ras();
|
||||
check_feature(ENABLE_SVE_FOR_NS, read_feat_sve_id_field(),
|
||||
"SVE", 1, 1);
|
||||
check_feature(ENABLE_FEAT_RAS, read_feat_ras_id_field(), "RAS", 1, 2);
|
||||
|
||||
/* v8.3 features */
|
||||
read_feat_pauth();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue