<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/firmware/arm_scmi/base.c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-08T13:12:00+00:00</updated>
<entry>
<title>firmware: arm_scmi: Use round_up() for base protocol list size calculation</title>
<updated>2026-03-08T13:12:00+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-02-28T03:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09bb95d63adeaab7b07127cfce4ecbeff9ab6488'/>
<id>urn:sha1:09bb95d63adeaab7b07127cfce4ecbeff9ab6488</id>
<content type='text'>
Replace the open-coded size rounding logic with the kernel's
round_up() helper to improve readability and align with common
kernel practices.

The original expression:
  (1 + (loop_num_ret - 1) / sizeof(u32)) * sizeof(u32)

is equivalent to rounding up loop_num_ret to the nearest multiple of
sizeof(u32), which is exactly what round_up() does.

No functional change.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Message-Id: &lt;20260228-scmi-check-v1-1-4935b58bb2db@nxp.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@kernel.org&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Remove legacy protocol versioning logic</title>
<updated>2025-12-27T20:09:30+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-12-27T16:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24a0ffefe3f097aa8fe6997a731a71487dd0721f'/>
<id>urn:sha1:24a0ffefe3f097aa8fe6997a731a71487dd0721f</id>
<content type='text'>
Protocol version negotiation logic is centralized in the SCMI core stack
so that most of the legacy per-protocol versioning logic is redundant and
can be removed.

Remove protocol-specific versioning code and refactor all the protocols to
use the new simplified centralized logic.

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Message-Id: &lt;20251227164132.1311988-3-cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Replace comma with the semicolon</title>
<updated>2024-08-28T16:16:25+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2024-08-27T14:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4b908a23fab2653cb844b77cbe576358c021053'/>
<id>urn:sha1:c4b908a23fab2653cb844b77cbe576358c021053</id>
<content type='text'>
Replace the typo comma with the semicolon. No functional change.

Message-Id: &lt;20240827143838.1465913-4-sudeep.holla@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Fix trivial whitespace/coding style issues</title>
<updated>2024-08-28T16:16:25+00:00</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2024-08-27T14:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=50db2ef5c719c90ef30cbc05dd80ac91688fd966'/>
<id>urn:sha1:50db2ef5c719c90ef30cbc05dd80ac91688fd966</id>
<content type='text'>
Fix couple of unnecessary multiple blank lines and spaces instead of
tabs.

No functional change.

Message-Id: &lt;20240827143838.1465913-2-sudeep.holla@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Update various protocols versions</title>
<updated>2024-08-16T09:26:58+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2024-08-12T17:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be9f086524b3ea17c27fb4cd57115bf873354791'/>
<id>urn:sha1:be9f086524b3ea17c27fb4cd57115bf873354791</id>
<content type='text'>
A few protocol versions had been increased with SCMI v3.2.
Update accordingly the supported version define in the kernel stack,
since all the mandatory base commands are indeed already supported.

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Message-Id: &lt;20240812174027.3931160-1-cristian.marussi@arm.com&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Add protocol versioning checks</title>
<updated>2023-12-01T16:46:10+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2023-12-01T13:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5efc28a754d2e90b9d52ba5aaa051cc24a5c85d'/>
<id>urn:sha1:b5efc28a754d2e90b9d52ba5aaa051cc24a5c85d</id>
<content type='text'>
Platform and agent supported protocols versions do not necessarily match.

When talking to an older SCMI platform, supporting only older protocol
versions, the kernel SCMI agent will downgrade the version of the used
protocol to match the platform and avoid compatibility issues.

In the case where the kernel/OSPM agent happens to communicate with a
newer platform which can support newer protocol versions unknown to
the agent, and potentially backward incompatible, the agent currently
carries on, silently, in a best-effort approach.

Note that the SCMI specification doesn't provide means to explicitly
detect the protocol versions used by the agents, neither it is required
to support multiple, older, protocol versions.

Add an explicit protocol version check to let the agent detect when this
version mismatch happens and warn the user about this condition.

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Link: https://lore.kernel.org/r/20231201135858.2367651-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Avoid using extended string-buffers sizes if not necessary</title>
<updated>2022-06-10T16:55:29+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2022-06-08T09:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4314f9f4f85832b5082f4e38b07b63b11baa538c'/>
<id>urn:sha1:4314f9f4f85832b5082f4e38b07b63b11baa538c</id>
<content type='text'>
Commit b260fccaebdc2 ("firmware: arm_scmi: Add SCMI v3.1 protocol extended
names support") moved all the name string buffers to use the extended buffer
size of 64 instead of the required 16 bytes. While that should be fine if
the firmware terminates the string before 16 bytes, there is possibility
of copying random data if the name is not NULL terminated by the firmware.

SCMI base protocol agent_name/vendor_id/sub_vendor_id are defined by the
specification as NULL-terminated ASCII strings up to 16-bytes in length.

The underlying buffers and message descriptors are currently bigger than
needed; resize them to fit only the strictly needed 16 bytes to avoid
any possible leaks when reading data from the firmware.

Change the size argument of strlcpy to use SCMI_SHORT_NAME_MAX_SIZE always
when dealing with short domain names, so as to limit the possibility that
an ill-formed non-NULL terminated short reply from the SCMI platform
firmware can leak stale content laying in the underlying transport shared
memory area.

While at that, convert all strings handling routines to use the preferred
strscpy.

Link: https://lore.kernel.org/r/20220608095530.497879-1-cristian.marussi@arm.com
Fixes: b260fccaebdc2 ("firmware: arm_scmi: Add SCMI v3.1 protocol extended names support")
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Relax base protocol sanity checks on the protocol list</title>
<updated>2022-06-06T14:46:35+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2022-05-23T17:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=122839b58a089ff7f231759e2c8f63790724cae2'/>
<id>urn:sha1:122839b58a089ff7f231759e2c8f63790724cae2</id>
<content type='text'>
Even though malformed replies from firmware must be treated carefully to
avoid memory corruption in the kernel, some out-of-spec SCMI replies can
be tolerated to avoid breaking existing deployed system, as long as they
won't cause memory issues.

Relax the sanity checks on the recieved protocol list in the base protocol
to avoid breaking one of the deployed platform whose firmware is not easily
upgradable currently.

Link: https://lore.kernel.org/r/20220523171559.472112-1-cristian.marussi@arm.com
Cc: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Reported-by: Nicolas Frattaroli &lt;frattaroli.nicolas@gmail.com&gt;
Tested-By: Frank Wunderlich &lt;frank-w@public-files.de&gt;
Acked-by: Michael Riesch &lt;michael.riesch@wolfvision.net&gt;
Acked-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Dynamically allocate implemented protocols array</title>
<updated>2022-04-28T17:22:51+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2022-03-30T15:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=776b6c8a25a36b5f46ed182ed6514c208e76720d'/>
<id>urn:sha1:776b6c8a25a36b5f46ed182ed6514c208e76720d</id>
<content type='text'>
Move away from a statically allocated array for holding the current set of
protocols implemented by the platform in favour of allocating it
dynamically based on the number of protocols effectively advertised by the
platform via BASE protocol exchanges.

While at that, rectify the BASE_DISCOVER_LIST_PROTOCOLS loop iterations to
terminate only when a number of protocols equal to the advertised ones has
been received, instead of looping till the platform returns no more
protocols descriptors. This new behaviour is better compliant with the
specification and it has been tested to work equally well against an SCMI
stack running on top of an official SCP firmware on a JUNO board.

Link: https://lore.kernel.org/r/20220330150551.2573938-6-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Validate BASE_DISCOVER_LIST_PROTOCOLS response</title>
<updated>2022-04-28T17:22:50+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2022-03-30T15:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b0041f6e10e5bdbb646d98172be43e88734ed62'/>
<id>urn:sha1:3b0041f6e10e5bdbb646d98172be43e88734ed62</id>
<content type='text'>
Do not blindly trust SCMI platform response about list of implemented
protocols, instead validate the reported length of the list of protocols
against the real payload size of the message reply.

Link: https://lore.kernel.org/r/20220330150551.2573938-5-cristian.marussi@arm.com
Fixes: b6f20ff8bd94 ("firmware: arm_scmi: add common infrastructure and support for base protocol")
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
[sudeep.holla: Added early break if loop_num_ret = 0 and simplified calc_list_sz
	calculation]
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
</feed>
