Add test case for SMCCC_ARCH_SOC_ID feature
Added test case for "SMCCC_ARCH_SOC_ID" SMC call.
This SMC call is used to retrieve SOC version and SOC revision
Test execution output is as below:
> Executing 'SMCCC_ARCH_SOC_ID test'
TEST COMPLETE Passed
SOC Rev is not implemented
SOC Ver = 0x43b0000
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I48668ce22bb5d5767dadb42ce9526d77fd916bed
diff --git a/include/runtime_services/arm_arch_svc.h b/include/runtime_services/arm_arch_svc.h
index 12358f8..36b4448 100644
--- a/include/runtime_services/arm_arch_svc.h
+++ b/include/runtime_services/arm_arch_svc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -9,6 +9,7 @@
#define SMCCC_VERSION 0x80000000
#define SMCCC_ARCH_FEATURES 0x80000001
+#define SMCCC_ARCH_SOC_ID 0x80000002
#define SMCCC_ARCH_WORKAROUND_1 0x80008000
#define SMCCC_ARCH_WORKAROUND_2 0x80007FFF
diff --git a/include/runtime_services/smccc.h b/include/runtime_services/smccc.h
index 34930b6..283b463 100644
--- a/include/runtime_services/smccc.h
+++ b/include/runtime_services/smccc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -20,6 +20,13 @@
SMCCC_VERSION_MINOR_SHIFT))
#define SMC_UNKNOWN -1
+#define SMC_OK 0
+
+/* Return codes for Arm Architecture Service SMC calls */
+#define SMC_ARCH_CALL_SUCCESS 0
+#define SMC_ARCH_CALL_NOT_SUPPORTED -1
+#define SMC_ARCH_CALL_NOT_REQUIRED -2
+#define SMC_ARCH_CALL_INVAL_PARAM -3
/*******************************************************************************
* Bit definitions inside the function id as per the SMC calling convention
@@ -64,4 +71,10 @@
#define OEN_TOS_END 63
#define OEN_LIMIT 64
+/*******************************************************************************
+ * Argument definitions passed to SMC call
+ ******************************************************************************/
+#define SMC_GET_SOC_VERSION 0
+#define SMC_GET_SOC_REVISION 1
+
#endif /* __SMCCC_H__ */