From ce4859554c64c9048c86df44a96e93f697df2207 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 10 Nov 2022 14:28:01 +0000 Subject: refactor(cpufeat): decouple FGT feature detection and build flags Split the feature check for FEAT_FGT into two parts: - A boolean function that just evaluates whether the feature is usable. This takes build time flags into account, and only evaluates the CPU feature ID registers when the flexible FEAT_STATE_CHECK method is used. - A "raw" function that returns the unfiltered CPU feature ID register. Change the callers where needed, to give them the version they actually want. Signed-off-by: Andre Przywara Change-Id: I9a041132d280451f5d9f653a62904f603b2a916d --- lib/el3_runtime/aarch64/context_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/el3_runtime') diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index 866ac4154..93d817f20 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -359,7 +359,7 @@ static void setup_context_common(cpu_context_t *ctx, const entry_point_info_t *e && (GET_M32(ep->spsr) == MODE32_hyp))) { scr_el3 |= SCR_HCE_BIT; - if (is_armv8_6_fgt_present()) { + if (is_feat_fgt_supported()) { scr_el3 |= SCR_FGTEN_BIT; } -- cgit v1.2.3