aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2020-02-22 08:43:00 +0000
committerManish V Badarkhe <Manish.Badarkhe@arm.com>2020-03-17 10:14:35 +0000
commit0e753437e75b68476b524d32c7e9db7f28d2ad85 (patch)
tree5fb7659f153f6305f355b7abc702abdf7160ee85 /include
parentbb37363bd30f5ccc625f47350d3ae56ddcddb236 (diff)
downloadplatform_external_arm-trusted-firmware-0e753437e75b68476b524d32c7e9db7f28d2ad85.tar.gz
platform_external_arm-trusted-firmware-0e753437e75b68476b524d32c7e9db7f28d2ad85.tar.bz2
platform_external_arm-trusted-firmware-0e753437e75b68476b524d32c7e9db7f28d2ad85.zip
Implement SMCCC_ARCH_SOC_ID SMC call
Implemented SMCCC_ARCH_SOC_ID call in order to get below SOC information: 1. SOC revision 2. SOC version Implementation done using below SMCCC specification document: https://developer.arm.com/docs/den0028/c Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ie0595f1c345a6429a6fb4a7f05534a0ca9c9a48b
Diffstat (limited to 'include')
-rw-r--r--include/plat/arm/common/plat_arm.h9
-rw-r--r--include/plat/common/platform.h10
-rw-r--r--include/services/arm_arch_svc.h6
3 files changed, 24 insertions, 1 deletions
diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h
index 6c2925afa..a84047aac 100644
--- a/include/plat/arm/common/plat_arm.h
+++ b/include/plat/arm/common/plat_arm.h
@@ -148,6 +148,12 @@ void arm_setup_romlib(void);
#define ARM_ROTPK_DEVEL_RSA_ID 2
#define ARM_ROTPK_DEVEL_ECDSA_ID 3
+/* Defines used to retrieve ARM SOC revision */
+#define ARM_SOC_CONTINUATION_CODE U(0x4)
+#define ARM_SOC_IDENTIFICATION_CODE U(0x3B)
+#define ARM_SOC_CONTINUATION_SHIFT U(24)
+#define ARM_SOC_IDENTIFICATION_SHIFT U(16)
+
/* IO storage utility functions */
int arm_io_setup(void);
@@ -323,4 +329,7 @@ extern const unsigned int arm_pm_idle_states[];
void plat_arm_secure_wdt_start(void);
void plat_arm_secure_wdt_stop(void);
+/* Get SOC-ID of ARM platform */
+uint32_t plat_arm_get_soc_id(void);
+
#endif /* PLAT_ARM_H */
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 5b5ebb973..e4431d2f0 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -322,4 +322,14 @@ void plat_flush_next_bl_params(void);
*/
unsigned int platform_core_pos_helper(unsigned long mpidr);
+/*
+ * Optional function to get SOC version
+ */
+int32_t plat_get_soc_version(void);
+
+/*
+ * Optional function to get SOC revision
+ */
+int32_t plat_get_soc_revision(void);
+
#endif /* PLATFORM_H */
diff --git a/include/services/arm_arch_svc.h b/include/services/arm_arch_svc.h
index 1cb2038c6..5bbd8bb6c 100644
--- a/include/services/arm_arch_svc.h
+++ b/include/services/arm_arch_svc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -9,7 +9,11 @@
#define SMCCC_VERSION U(0x80000000)
#define SMCCC_ARCH_FEATURES U(0x80000001)
+#define SMCCC_ARCH_SOC_ID U(0x80000002)
#define SMCCC_ARCH_WORKAROUND_1 U(0x80008000)
#define SMCCC_ARCH_WORKAROUND_2 U(0x80007FFF)
+#define SMCCC_GET_SOC_VERSION U(0)
+#define SMCCC_GET_SOC_REVISION U(1)
+
#endif /* ARM_ARCH_SVC_H */