]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: smccc: Fix Arm SMCCC SOC_ID name call
authorAndre Przywara <andre.przywara@arm.com>
Tue, 2 Sep 2025 17:20:53 +0000 (18:20 +0100)
committerSudeep Holla <sudeep.holla@kernel.org>
Wed, 20 May 2026 08:41:44 +0000 (09:41 +0100)
commit70492cfce2a4d41e87bf46989028a90f4bc6b38f
tree92c5a9c1bfa81a54a8deeb388501a0fc5f9ef66b
parent01b9cae706161a39452a2cce0f281d4369344c51
firmware: smccc: Fix Arm SMCCC SOC_ID name call

Commit 5f9c23abc477 ("firmware: smccc: Support optional Arm SMCCC SOC_ID
name") introduced the SOC_ID name string call, which reports a human
readable string describing the SoC, as returned by firmware.

The SMCCC spec v1.6 describes this feature as AArch64 only, since we rely
on 8 characters to be transmitted per register. Consequently the SMCCC
call must use the AArch64 calling convention, which requires bit 30 of
the FID to be set. The spec is a bit confusing here, since it mentions
that in the parameter description ("2: SoC name (optionally implemented for
SMC64 calls, ..."), but still prints the FID explicitly as 0x80000002.

But as this FID is using the SMC32 calling convention (correct for the
other two calls), it will not match what any SMCCC conformant firmware is
expecting, so any call would return NOT_SUPPORTED.

Add a 64-bit version of the ARCH_SOC_ID FID macro, and use that for the
SoC name version of the call to fix the issue.

Fixes: 5f9c23abc477 ("firmware: smccc: Support optional Arm SMCCC SOC_ID name")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://patch.msgid.link/20250902172053.304911-1-andre.przywara@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
drivers/firmware/smccc/soc_id.c
include/linux/arm-smccc.h