feat(smccc): add SoC name support to SMCCC_ARCH_SOC_ID
This patch adds support for getting the SoC name string
using the SMCCC_ARCH_SOC_ID interface. The SoC name query
was introduced in SMCCC version 1.6. It is available only
through SMC64 calls.
A new function ID, SMCCC_GET_SOC_NAME, is added. It returns
the SoC name as a null-terminated ASCII string, spread across
registers X1 to X17 in little endian order.
The total length is 136 bytes, including the null byte.
Any space after the null terminator is filled
with zeros.
A platform hook plat_get_soc_name() is added to return the
SoC name. A weak default version is also provided that returns
SMC_ARCH_CALL_NOT_SUPPORTED for platforms that do not support
this feature.
The name should follow the SMCCC rule that it must not expose
any information that is not already reported
by the SoC version and revision calls.
Reference: https://developer.arm.com/documentation/den0028/latest/
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Idc69997c509bcbfb1cecb38ed1003b29627ade4b
diff --git a/plat/common/plat_bl_common.c b/plat/common/plat_bl_common.c
index f10f2d7..990a36a 100644
--- a/plat/common/plat_bl_common.c
+++ b/plat/common/plat_bl_common.c
@@ -31,6 +31,7 @@
#pragma weak plat_is_smccc_feature_available
#pragma weak plat_get_soc_version
#pragma weak plat_get_soc_revision
+#pragma weak plat_get_soc_name
int32_t plat_get_soc_version(void)
{
@@ -42,6 +43,11 @@
return SMC_ARCH_CALL_NOT_SUPPORTED;
}
+int32_t plat_get_soc_name(char *soc_name __unused)
+{
+ return SMC_ARCH_CALL_NOT_SUPPORTED;
+}
+
int32_t plat_is_smccc_feature_available(u_register_t fid __unused)
{
return SMC_ARCH_CALL_NOT_SUPPORTED;