<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/soc/qcom/mdt_loader.c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-07-23T11:53:57Z</updated>
<entry>
<title>soc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup</title>
<updated>2023-07-23T11:53:57Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2023-05-26T11:55:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15544619bcd9912d7417c115fcbf65527e4d674e'/>
<id>urn:sha1:15544619bcd9912d7417c115fcbf65527e4d674e</id>
<content type='text'>
commit bcb889891371c3cf767f2b9e8768cfe2fdd3810f upstream.

Commit ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS
mem_setup") dropped the relocate check and made pas_mem_setup run
unconditionally. The code was later moved with commit f4e526ff7e38
("soc: qcom: mdt_loader: Extract PAS operations") to
qcom_mdt_pas_init() effectively losing track of what was actually
done.

The assumption that PAS mem_setup can be done anytime was effectively
wrong, with no good reason and this caused regression on some SoC
that use remoteproc to bringup ath11k. One example is IPQ8074 SoC that
effectively broke resulting in remoteproc silently die and ath11k not
working.

On this SoC FW relocate is not enabled and PAS mem_setup was correctly
skipped in previous kernel version resulting in correct bringup and
function of remoteproc and ath11k.

To fix the regression, reintroduce the relocate check in
qcom_mdt_pas_init() and correctly skip PAS mem_setup where relocate is
not enabled.

Fixes: ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS mem_setup")
Tested-by: Robert Marko &lt;robimarko@gmail.com&gt;
Co-developed-by: Robert Marko &lt;robimarko@gmail.com&gt;
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Mukesh Ojha &lt;quic_mojha@quicinc.com&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20230526115511.3328-1-ansuelsmth@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/</title>
<updated>2023-02-09T03:15:16Z</updated>
<author>
<name>Elliot Berman</name>
</author>
<published>2023-02-03T21:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bf90eca76c98c55c975fa817799789b9176f9f3'/>
<id>urn:sha1:3bf90eca76c98c55c975fa817799789b9176f9f3</id>
<content type='text'>
Move include/linux/qcom_scm.h to include/linux/firmware/qcom/qcom_scm.h.
This removes 1 of a few remaining Qualcomm-specific headers into a more
approciate subdirectory under include/.

Suggested-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Elliot Berman &lt;quic_eberman@quicinc.com&gt;
Reviewed-by: Guru Das Srinagesh &lt;quic_gurus@quicinc.com&gt;
Acked-by: Mukesh Ojha &lt;quic_mojha@quicinc.com&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20230203210956.3580811-1-quic_eberman@quicinc.com
</content>
</entry>
<entry>
<title>soc: qcom: correct kerneldoc</title>
<updated>2022-06-26T03:05:31Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2022-05-19T07:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d11a34a404ee5565ce8e0abe3e2b9ce6f5cc0a4b'/>
<id>urn:sha1:d11a34a404ee5565ce8e0abe3e2b9ce6f5cc0a4b</id>
<content type='text'>
Correct kerneldoc warnings like:

  drivers/soc/qcom/mdt_loader.c:126:
    warning: Function parameter or member 'fw_name' not described in 'qcom_mdt_read_metadata'

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220519073301.7072-2-krzysztof.kozlowski@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Fix split-firmware condition</title>
<updated>2022-02-23T19:13:12Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-02-15T03:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1b019872693c74d919db4e267f451fc7af9a21c'/>
<id>urn:sha1:a1b019872693c74d919db4e267f451fc7af9a21c</id>
<content type='text'>
The updated condition checking if a segment can be found in the loaded
firmware blob, or need to be loaded from a separate file, incorrectly
classifies segments that ends at the end of the loaded blob. The result
is that the mdt loader attempts to load the segment from a separate
file.

Correct the conditional to use the loaded segment instead.

Fixes: ea90330fa329 ("soc: qcom: mdt_loader: Extend check for split firmware")
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20220215034819.1209367-1-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Extract PAS operations</title>
<updated>2022-02-04T03:54:48Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4e526ff7e38e27bb87d53131d227a6fd6f73ab5'/>
<id>urn:sha1:f4e526ff7e38e27bb87d53131d227a6fd6f73ab5</id>
<content type='text'>
Rather than passing a boolean to indicate if the PAS operations should
be performed from within __mdt_load(), extract them to their own helper
function.

This will allow clients to invoke this directly, with some
qcom_scm_pas_metadata context that they later needs to release, without
further having to complicate the prototype of qcom_mdt_load().

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-9-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Always invoke PAS mem_setup</title>
<updated>2022-02-03T21:32:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9'/>
<id>urn:sha1:ebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9</id>
<content type='text'>
After spelunking various old kernel trees no finds has been found
indicating that the PAS mem_setup call should actually be made
conditional on the image being relocatable.

Group the two PAS operations together, to facilitate splitting them out
in a following patch.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-8-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Reorder parts of __qcom_mdt_load()</title>
<updated>2022-02-03T21:32:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75d7213ce19135b8f309099f6618a03e9b397271'/>
<id>urn:sha1:75d7213ce19135b8f309099f6618a03e9b397271</id>
<content type='text'>
Move the traversal of the program headers to the start of the function,
to make sure that min_ and max_addr are in scope as the call to
qcom_scm_pas_mem_setup() is moved in the next commit.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-7-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Extend check for split firmware</title>
<updated>2022-02-03T21:32:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea90330fa329e4bee009223a1d5a7d9bcc364df2'/>
<id>urn:sha1:ea90330fa329e4bee009223a1d5a7d9bcc364df2</id>
<content type='text'>
Some of the Qualcomm SM8450 firmware files are padded such that the
start of the first segment falls within the .mdt file but the segment to
be loaded is stored as a separate .bNN file.

Extend the condition to only attempt to read a segment inline if the
entire segment would be available.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-6-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Allow hash to reside in any segment</title>
<updated>2022-02-03T21:32:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64fb5eb87d5815ff3811b7dc85f87abc5c38b580'/>
<id>urn:sha1:64fb5eb87d5815ff3811b7dc85f87abc5c38b580</id>
<content type='text'>
It's been observed that some firmware found on Qualcomm SM8450 devices
carries the hash segment as the last segment in the ELF. Extend the
support to allow picking the hash from any segment in the MDT/MBN.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-5-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: mdt_loader: Allow hash segment to be split out</title>
<updated>2022-02-03T21:32:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bd42e2341a7857010001f08ee1729ced3b0e394'/>
<id>urn:sha1:8bd42e2341a7857010001f08ee1729ced3b0e394</id>
<content type='text'>
It's been observed that some firmware found in a Qualcomm SM8450 device
has the hash table in a separate .bNN file. Use the newly extracted
helper function to load this segment from the separate file, if it's
determined that the hashes are not part of the already loaded firmware.

In order to do this, the function needs access to the firmware basename
and to provide more useful error messages a struct device to associate
the errors with.

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20220128025513.97188-4-bjorn.andersson@linaro.org
</content>
</entry>
</feed>
