<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/firmware, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>scmi: Avoid a use-after-free</title>
<updated>2025-06-09T22:32:11+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2025-06-09T22:30:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d41a2ba73cbe4ed9f3d3de5c4755fb5db6b80847'/>
<id>d41a2ba73cbe4ed9f3d3de5c4755fb5db6b80847</id>
<content type='text'>
Use LIST_FOREACH_SAFE to avoid a use-after-free in scmi_reqs_pool_free.
The next pointer will be invalid after the call to free meaning
LIST_FOREACH will dereference a freed struct to move to the next item.

Reviewed by:	emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D50753
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use LIST_FOREACH_SAFE to avoid a use-after-free in scmi_reqs_pool_free.
The next pointer will be invalid after the call to free meaning
LIST_FOREACH will dereference a freed struct to move to the next item.

Reviewed by:	emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D50753
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add sysctl transport properties</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:27:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5a54d768e1f90d5e382083c014495058418a6c53'/>
<id>5a54d768e1f90d5e382083c014495058418a6c53</id>
<content type='text'>
Expose as read-only the configured transport properties.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47428
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Expose as read-only the configured transport properties.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47428
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add SDT traces to the core stack</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:26:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d5778530d1d9130ac6ba03eaf54364403eb6706d'/>
<id>d5778530d1d9130ac6ba03eaf54364403eb6706d</id>
<content type='text'>
Add a few basic traces to track SCMI messages lifecycle.

Tested on:      Arm Morello Board
Reviewed by:	Andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47427
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a few basic traces to track SCMI messages lifecycle.

Tested on:      Arm Morello Board
Reviewed by:	Andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47427
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add optional asynchronous handling of replies</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:26:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e478b80556a12820786fb7695eb044786931c2f3'/>
<id>e478b80556a12820786fb7695eb044786931c2f3</id>
<content type='text'>
Add the core logic to handle the replies to pending command in an
asynchronous manner.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47426
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the core logic to handle the replies to pending command in an
asynchronous manner.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47426
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Refactor scmi_request internal logic</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:24:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8f706629284dea513bac3a59f3bfd745666062ad'/>
<id>8f706629284dea513bac3a59f3bfd745666062ad</id>
<content type='text'>
Split scmi_request internals into a TX and an RX phase, which will be
called, anyway, in sequence as before when a normal transmission is
requested.

No functional change.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47425
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split scmi_request internals into a TX and an RX phase, which will be
called, anyway, in sequence as before when a normal transmission is
requested.

No functional change.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47425
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add scmi_token_reserve helper</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-06-09T13:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=35ec332f3471375e4779542eea4ff1d30685d2a3'/>
<id>35ec332f3471375e4779542eea4ff1d30685d2a3</id>
<content type='text'>
During normal operation, the SCMI stack, upon each transmission attempt,
takes care to automatically pick an appropriate, monotonically increasing,
sequence number to fill-in the token field in the egressing message.

This does not cope well with the alternative scenario in which, instead,
a complete and fully formed message is provided upfront: in such a case the
SCMI stack will have to use the already provided sequence number, embedded
in the message, to track such transaction.

Add a method to attempt to reserve a specific sequence number to be used
when a fully firmed (raw) message is handled.

Tested on:      Arm Morello Board
Reported by:	andrew
Sponsored by:	Arm ltd
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During normal operation, the SCMI stack, upon each transmission attempt,
takes care to automatically pick an appropriate, monotonically increasing,
sequence number to fill-in the token field in the egressing message.

This does not cope well with the alternative scenario in which, instead,
a complete and fully formed message is provided upfront: in such a case the
SCMI stack will have to use the already provided sequence number, embedded
in the message, to track such transaction.

Add a method to attempt to reserve a specific sequence number to be used
when a fully firmed (raw) message is handled.

Tested on:      Arm Morello Board
Reported by:	andrew
Sponsored by:	Arm ltd
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add helper to manipulate scmi_msg descriptors</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:23:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f700da1c20f1f103d2ab2899d7060d3e331f082e'/>
<id>f700da1c20f1f103d2ab2899d7060d3e331f082e</id>
<content type='text'>
Refactor allocation logic for scmi_req and introduce new helpers to be able
to obtain an scmi_msg reference to a freshly allocated request.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47423
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor allocation logic for scmi_req and introduce new helpers to be able
to obtain an scmi_msg reference to a freshly allocated request.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47423
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Add devicetree transport properties</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T13:01:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ba510513e83dc1db9d3e40c143c2d3d7d41bd798'/>
<id>ba510513e83dc1db9d3e40c143c2d3d7d41bd798</id>
<content type='text'>
SCMI transport characteristics can be optionally described in the
devicetree to override the default build-time values.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47422
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SCMI transport characteristics can be optionally described in the
devicetree to override the default build-time values.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47422
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Redefine max message payload size</title>
<updated>2025-06-04T01:32:40+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-01-23T12:49:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a14428c69b84b65a0b3110fd3f4d1e4732271171'/>
<id>a14428c69b84b65a0b3110fd3f4d1e4732271171</id>
<content type='text'>
The defined maximum payload size should not include header and status
field. Fix the definition accordingly, so that it matches the
definitions as can be found in the Linux SCMI stack.
The semantic of this define is important since it will then be possible
to override such values from devicetree, like in Linux.

Tested on:	Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47421
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The defined maximum payload size should not include header and status
field. Fix the definition accordingly, so that it matches the
definitions as can be found in the Linux SCMI stack.
The semantic of this define is important since it will then be possible
to override such values from devicetree, like in Linux.

Tested on:	Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47421
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scmi: Make transports report the effective length of the received messages</title>
<updated>2025-06-04T01:32:39+00:00</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2025-06-09T13:22:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c758208373f36c21e0cb15b166e9a6d3d93edc99'/>
<id>c758208373f36c21e0cb15b166e9a6d3d93edc99</id>
<content type='text'>
Once a message is received that fits into the RX buffer, update the
msg.rx_len field with the effective length of the message received.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Once a message is received that fits into the RX buffer, update the
msg.rx_len field with the effective length of the message received.

Tested on:      Arm Morello Board
Reviewed by:	andrew
Sponsored by:	Arm Ltd
Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
