summaryrefslogtreecommitdiff
path: root/bl32
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2023-01-26 16:47:52 +0000
committerAndre Przywara <andre.przywara@arm.com>2023-04-25 15:09:30 +0100
commit88727fc3ec897b176f30a6d41111c4a0e581d6e8 (patch)
treea24b845129259080ce9d023bef25920ac30e8c16 /bl32
parent100f56d873591a8de61ff8826c2ed8cdd09f3338 (diff)
downloadarm-trusted-firmware-88727fc3ec897b176f30a6d41111c4a0e581d6e8.tar.gz
refactor(cpufeat): enable FEAT_DIT for FEAT_STATE_CHECKED
At the moment we only support FEAT_DIT to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_DIT=2), by splitting is_armv8_4_dit_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). We use ENABLE_DIT in two occassions in assembly code, where we just set the DIT bit in the DIT system register. Protect those two cases by reading the CPU ID register when ENABLE_DIT is set to 2. 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: I506d352f18e23c60db8cdf08edb449f60adbe098 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'bl32')
-rw-r--r--bl32/tsp/tsp_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bl32/tsp/tsp_main.c b/bl32/tsp/tsp_main.c
index df9903bb2..0878ea4d3 100644
--- a/bl32/tsp/tsp_main.c
+++ b/bl32/tsp/tsp_main.c
@@ -263,7 +263,7 @@ smc_args_t *tsp_smc_handler(uint64_t func,
results[1] /= service_arg1 ? service_arg1 : 1;
break;
case TSP_CHECK_DIT:
- if (!is_armv8_4_dit_present()) {
+ if (!is_feat_dit_supported()) {
ERROR("DIT not supported\n");
results[0] = 0;
results[1] = 0xffff;