test(SMCCC): test SMCCC_ARCH_FEATURE_AVAILABILITY
This test calls the function with each valid argument and checks that
every bit is set if its relevant feature is present in the system. It
also fails the test if any set bit in the return value has not been
checked. This should serve as a reminder to update this test for every
new feature that is implemented.
Only feature that tfa supports are tested with the expectation that new
ones will be added in the future.
Co-developed-by: Charlie Bareham <charlie.bareham@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I801326a49810bb76bfc3b9d06780d416dcc32a40
diff --git a/include/runtime_services/arm_arch_svc.h b/include/runtime_services/arm_arch_svc.h
index 0d2eb38..0b4e2ad 100644
--- a/include/runtime_services/arm_arch_svc.h
+++ b/include/runtime_services/arm_arch_svc.h
@@ -13,5 +13,6 @@
#define SMCCC_ARCH_WORKAROUND_1 0x80008000
#define SMCCC_ARCH_WORKAROUND_2 0x80007FFF
#define SMCCC_ARCH_WORKAROUND_3 0x80003FFF
+#define SMCCC_ARCH_FEATURE_AVAILABILITY U(0x80000003)
#endif /* __ARM_ARCH_SVC_H__ */
diff --git a/include/runtime_services/smccc.h b/include/runtime_services/smccc.h
index b898138..513ec8f 100644
--- a/include/runtime_services/smccc.h
+++ b/include/runtime_services/smccc.h
@@ -80,4 +80,9 @@
#define SMC_GET_SOC_VERSION 0
#define SMC_GET_SOC_REVISION 1
+#define SCR_EL3_OPCODE U(0x1E1100)
+#define CPTR_EL3_OPCODE U(0x1E1140)
+#define MDCR_EL3_OPCODE U(0x1E1320)
+#define MPAM3_EL3_OPCODE U(0x1EA500)
+
#endif /* __SMCCC_H__ */