summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2022-11-17 16:42:09 +0000
committerAndre Przywara <andre.przywara@arm.com>2023-03-20 13:37:36 +0000
commit6437a09a2db5774438fb1a95c508ed6b0a9f0ef2 (patch)
tree831ab1562452ab1700c3e40684dd871fb4deb083 /include/lib
parent90118bb5c180198db3386c3e1f5be8e32707c2cc (diff)
downloadarm-trusted-firmware-6437a09a2db5774438fb1a95c508ed6b0a9f0ef2.tar.gz
refactor(spe): enable FEAT_SPE for FEAT_STATE_CHECKED
At the moment we only support FEAT_SPE to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_SPE_FOR_NS=2), by splitting is_armv8_2_feat_spe_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), and is used before we access SPE related registers. Previously SPE was enabled unconditionally for all platforms, change this now to the runtime detection version. Change-Id: I830c094107ce6a398bf1f4aef7ffcb79d4f36552 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/extensions/spe.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/lib/extensions/spe.h b/include/lib/extensions/spe.h
index d4b925fe4..d443f18fb 100644
--- a/include/lib/extensions/spe.h
+++ b/include/lib/extensions/spe.h
@@ -9,8 +9,16 @@
#include <stdbool.h>
-bool spe_supported(void);
+#if ENABLE_SPE_FOR_NS
void spe_enable(bool el2_unused);
void spe_disable(void);
+#else
+void spe_enable(bool el2_unused)
+{
+}
+void spe_disable(void)
+{
+}
+#endif
#endif /* SPE_H */