summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTze Yee Ng <tze.yee.ng@altera.com>2026-06-02 22:28:42 -0700
committerDinh Nguyen <dinguyen@kernel.org>2026-06-08 22:37:35 +0900
commit71e6a19fe2669faf7dcb96ba8a4fde927485e60e (patch)
treed195bfd4d36ae875426e38b34db5adb8c9ca9067 /drivers
parent30b1f763bfc1b0db42f58904ec378066cc886c44 (diff)
firmware: stratix10-svc: Add support to query Arm Trusted Firmware (ATF) version
Add entry in Stratix10 service layer that allow client to retrieve the ATF version at runtime, which is useful for system diagnostics, compatibility checks, and ensuring the correct secure firmware is in use. The change introduces: - A new service command definition in the Stratix10 service layer to initiate the ATF version query. - A corresponding macro definition in the header file to expose the command ID for use by other components. The service layer uses a Secure Monitor Call (SMC) to communicate with the ATF and retrieve the version string, which can then be logged or validated by client application. Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/stratix10-svc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index 282211d2612b..00e134e663c8 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -486,6 +486,12 @@ static void svc_thread_recv_status_ok(struct stratix10_svc_data *p_data,
cb_data->kaddr1 = &res.a1;
cb_data->kaddr2 = &res.a2;
break;
+ case COMMAND_SMC_ATF_BUILD_VER:
+ cb_data->status = BIT(SVC_STATUS_OK);
+ cb_data->kaddr1 = &res.a1;
+ cb_data->kaddr2 = &res.a2;
+ cb_data->kaddr3 = &res.a3;
+ break;
case COMMAND_RSU_DCMF_VERSION:
cb_data->status = BIT(SVC_STATUS_OK);
cb_data->kaddr1 = &res.a1;
@@ -704,6 +710,12 @@ static int svc_normal_to_secure_thread(void *data)
a1 = 0;
a2 = 0;
break;
+ case COMMAND_SMC_ATF_BUILD_VER:
+ a0 = INTEL_SIP_SMC_ATF_BUILD_VER;
+ a1 = 0;
+ a2 = 0;
+ a3 = 0;
+ break;
case COMMAND_MBOX_SEND_CMD:
a0 = INTEL_SIP_SMC_MBOX_SEND_CMD;
a1 = pdata->arg[0];