summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>2023-03-06 23:56:14 +0000
committerManish V Badarkhe <manish.badarkhe@arm.com>2023-03-28 17:19:07 +0200
commit45007acd46981b9f289f03b283eb53e7ba37bb67 (patch)
treedf4d289c742923fcb05a61d7fa85400272b7873d /common
parentcfe6a82ee87ff178e05f542f65549520cf764956 (diff)
downloadarm-trusted-firmware-45007acd46981b9f289f03b283eb53e7ba37bb67.tar.gz
feat(cpufeat): enable FEAT_SME for FEAT_STATE_CHECKED
Add support for runtime detection (ENABLE_SME_FOR_NS=2), by splitting feat_sme_supported() 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 do SME specific setup. 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: Ida9ccf737db5be20865b84f42b1f9587be0626ab Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Diffstat (limited to 'common')
-rw-r--r--common/feat_detect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/feat_detect.c b/common/feat_detect.c
index 12cf12638..609a38888 100644
--- a/common/feat_detect.c
+++ b/common/feat_detect.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -216,6 +216,8 @@ void detect_arch_features(void)
"TRBE", 1, 1);
/* v9.2 features */
+ check_feature(ENABLE_SME_FOR_NS, read_feat_sme_id_field(),
+ "SME", 1, 2);
read_feat_rme();
if (tainted) {