]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(tc): enable dynamic feature detection of FEAT_SVE for NormalWorld
authorJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Fri, 31 Mar 2023 09:39:22 +0000 (10:39 +0100)
committerJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Mon, 3 Apr 2023 16:05:38 +0000 (17:05 +0100)
Currently, TF-A supports three states for feature flags:
0: FEAT_DISABLED
1: FEAT_STATE_ALWAYS (for fixed/real platforms)
2: FEAT_STATE_CHECK  (for configurable platforms)
to meet the feature detection requirements dynamically, mainly
targetting configurable/Fixed Virtual platforms.

With this mechanism in place, we are refactoring all the existing
feature flags to the FEAT_STATE_CHECK option(=2), including
FEAT_SVE explicitly for FVPs.

SVE Patch Reference:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/19888/25

This newly introduced change, breaks the existing behaviour especially
for virtual platforms, who have set the ENABLE_SVE_FOR_NS flag to 1.

Moving ahead, we advise the platforms to take the following steps while
enabling the features:

1. If the platform is configurable (virtual), and want to ensure feature
detection happens dynamically at runtime, set the build flags to
FEAT_STATE_CHECK(=2).

2. For real(fixed) platforms, depending on the features supported by the
hardware and platform wants to enable it, platforms could set build
flags to FEAT_STATE_ALWAYS(=1).

(Note: Only the non-secure world enablement related build flags have
been refactored to take the values within 0 to 2. As earlier Secure
world enablement flags will still remain boolean.)

Henceforth, in order to keep it aligned with this tri-state mechanism,
changing the TC platform default to the now supported dynamic
option(=2), so the right decision can be made by the code at runtime.

Change-Id: I4c1ebeb55a00a7f148fac1573a6694b7c02a0a81
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
plat/arm/board/tc/platform.mk

index c6a82deef8edb5345644865def796a4a4969bd80..7fdc4fd84f8dc88f819ffd320fe6bfbe68d16fa8 100644 (file)
@@ -41,7 +41,7 @@ GIC_ENABLE_V4_EXTN    :=      1
 GICV3_SUPPORT_GIC600   :=      1
 
 # Enable SVE
-ENABLE_SVE_FOR_NS      :=      1
+ENABLE_SVE_FOR_NS      :=      2
 ENABLE_SVE_FOR_SWD     :=      1
 
 # enable trace buffer control registers access to NS by default