From 1298f2f13d6d97dfcac120a2ee68d5eea3797068 Mon Sep 17 00:00:00 2001 From: Jayanth Dodderi Chidanand Date: Mon, 9 May 2022 12:33:03 +0100 Subject: feat(brbe): add brbe under feature detection mechanism This change adds "FEAT_BRBE" to be part of feature detection mechanism. Previously feature enablement flags were of boolean type, possessing either 0 or 1. With the introduction of feature detection procedure we now support three states for feature enablement build flags(0 to 2). Accordingly, "ENABLE_BRBE_FOR_NS" flag is now modified from boolean to numeric type to align with the feature detection. Signed-off-by: Jayanth Dodderi Chidanand Change-Id: I1eb52863b4afb10b808e2f0b6584a8a210d0f38c --- common/feat_detect.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'common') diff --git a/common/feat_detect.c b/common/feat_detect.c index 8f98876ac..9d0685be6 100644 --- a/common/feat_detect.c +++ b/common/feat_detect.c @@ -234,6 +234,16 @@ 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_1) + feat_detect_panic(is_feat_brbe_present(), "BRBE"); +#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 @@ -294,6 +304,9 @@ void detect_arch_features(void) /* v8.7 features */ read_feat_hcx(); + /* v9.0 features */ + read_feat_brbe(); + /* v9.2 features */ read_feat_rme(); } -- cgit v1.2.1