<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/firmware/qcom_scm.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-02-04T03:54:48Z</updated>
<entry>
<title>firmware: qcom: scm: Add support for MC boot address API</title>
<updated>2022-02-04T03:54:48Z</updated>
<author>
<name>Stephan Gerhold</name>
</author>
<published>2021-12-01T13:05:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f60a317bcbea5c5b8923d6de6c7288850fdd83fb'/>
<id>urn:sha1:f60a317bcbea5c5b8923d6de6c7288850fdd83fb</id>
<content type='text'>
It looks like the old QCOM_SCM_BOOT_SET_ADDR API is broken on some
MSM8916 firmware versions that implement the newer SMC32 calling
convention. It just returns -EINVAL no matter which arguments are
being passed.

This does not cause any problems downstream because it first tries
to use the new multi-cluster API replacement which is working fine.

Implement support for the multi-cluster variant of the SCM call
by attempting it first but still fallback to the old call in case
of an error. Also, to be absolutely sure only use the multi-cluster
variant with the SMC calling convention since older platforms should
not need this.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211201130505.257379-5-stephan@gerhold.net
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Drop cpumask parameter from set_boot_addr()</title>
<updated>2022-02-04T03:54:48Z</updated>
<author>
<name>Stephan Gerhold</name>
</author>
<published>2021-12-01T13:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52beb1fc237d67cdc64277dc90047767a6fc52d7'/>
<id>urn:sha1:52beb1fc237d67cdc64277dc90047767a6fc52d7</id>
<content type='text'>
qcom_scm_set_cold/warm_boot_addr() currently take a cpumask parameter,
but it's not very useful because at the end we always set the same entry
address for all CPUs. This also allows speeding up probe of
cpuidle-qcom-spm a bit because only one SCM call needs to be made to
the TrustZone firmware, instead of one per CPU.

The main reason for this change is that it allows implementing the
"multi-cluster" variant of the set_boot_addr() call more easily
without having to rely on functions that break in certain build
configurations or that are not exported to modules.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211201130505.257379-4-stephan@gerhold.net
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Simplify set_cold/warm_boot_addr()</title>
<updated>2022-02-04T03:54:48Z</updated>
<author>
<name>Stephan Gerhold</name>
</author>
<published>2021-12-01T13:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7734c4b507cefbcf2f7a2a806e79c43e52528c5f'/>
<id>urn:sha1:7734c4b507cefbcf2f7a2a806e79c43e52528c5f</id>
<content type='text'>
The qcom_scm_set_cold/warm_boot_addr() implementations have a lot of
functionality that is actually not used.

For example, set_warm_boot_addr() caches the last used entry address
and skips making the SCM call when the entry address is unchanged.
But there is actually just a single call of qcom_scm_set_warm_boot_addr()
in the whole kernel tree, which always configures the entry address
to cpu_resume_arm().

Simplify this by having a single qcom_scm_set_boot_addr() function
for both cold and warm boot address. This is totally sufficient for
the functionality supported in the mainline tree.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211201130505.257379-3-stephan@gerhold.net
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Introduce pas_metadata context</title>
<updated>2022-02-03T21:32:29Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2022-01-28T02:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a99f121fe0bfa4b65ff74d9e980018caf54c2d4'/>
<id>urn:sha1:3a99f121fe0bfa4b65ff74d9e980018caf54c2d4</id>
<content type='text'>
Starting with Qualcomm SM8450, some new security enhancements has been
done in the secure world, which results in the requirement to keep the
metadata segment accessible by the secure world from init_image() until
auth_and_reset().

Introduce a "PAS metadata context" object that can be passed to
init_image() for tracking the mapped memory and a related release
function for client drivers to release the mapping once either
auth_and_reset() has been invoked or in error handling paths on the way
there.

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-2-bjorn.andersson@linaro.org
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Fix some kernel-doc comments</title>
<updated>2022-01-31T21:56:32Z</updated>
<author>
<name>Yang Li</name>
</author>
<published>2021-12-30T14:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5d32f6d2e59a654036d5a4f59d9202302b23388'/>
<id>urn:sha1:a5d32f6d2e59a654036d5a4f59d9202302b23388</id>
<content type='text'>
Fix qcom_scm_call(), qcom_scm_call_atomic,
and qcom_scm_cpu_power_down() kernel-doc comment to remove
remove warnings found by running scripts/kernel-doc, which
is caused by using 'make W=1'.
drivers/firmware/qcom_scm.c:191: warning: Function parameter or member
'res' not described in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:191: warning: Excess function parameter
'svc_id' description in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:191: warning: Excess function parameter
'cmd_id' description in 'qcom_scm_call'
drivers/firmware/qcom_scm.c:219: warning: Excess function parameter
'svc_id' description in 'qcom_scm_call_atomic'
drivers/firmware/qcom_scm.c:219: warning: Excess function parameter
'cmd_id' description in 'qcom_scm_call_atomic'
drivers/firmware/qcom_scm.c:360: warning: Function parameter or member
'flags' not described in 'qcom_scm_cpu_power_down'

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211230141245.29444-1-yang.lee@linux.alibaba.com
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Add function to set IOMMU pagetable addressing</title>
<updated>2022-01-31T21:00:46Z</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
</author>
<published>2021-12-08T08:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=071a13332de894cb3c38b17c82350f1e4167c023'/>
<id>urn:sha1:071a13332de894cb3c38b17c82350f1e4167c023</id>
<content type='text'>
Add a function to change the IOMMU pagetable addressing to
AArch32 LPAE or AArch64. If doing that, then this must be
done for each IOMMU context (not necessarily at the same time).

Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@somainline.org&gt;
[Marijn: ported from 5.3 to the unified architecture in 5.11]
Signed-off-by: Marijn Suijten &lt;marijn.suijten@somainline.org&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211208083423.22037-4-marijn.suijten@somainline.org
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Add function to set the maximum IOMMU pool size</title>
<updated>2022-01-31T21:00:46Z</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
</author>
<published>2021-12-08T08:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=943515090ec67f81f6f93febfddb8c9118357e97'/>
<id>urn:sha1:943515090ec67f81f6f93febfddb8c9118357e97</id>
<content type='text'>
This is not necessary for basic functionality of the IOMMU, but
it's an optimization that tells to the TZ what's the maximum
mappable size for the secure IOMMUs, so that it can optimize
the data structures in the TZ itself.

Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@somainline.org&gt;
[Marijn: ported from 5.3 to the unified architecture in 5.11]
Signed-off-by: Marijn Suijten &lt;marijn.suijten@somainline.org&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211208083423.22037-3-marijn.suijten@somainline.org
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Remove reassignment to desc following initializer</title>
<updated>2022-01-31T21:00:46Z</updated>
<author>
<name>Marijn Suijten</name>
</author>
<published>2021-12-08T08:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7823e5aa5d1dd9ed5849923c165eb8f29ad23c54'/>
<id>urn:sha1:7823e5aa5d1dd9ed5849923c165eb8f29ad23c54</id>
<content type='text'>
Member assignments to qcom_scm_desc were moved into struct initializers
in 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers") including
the case in qcom_scm_iommu_secure_ptbl_init, except that the - now
duplicate - assignment to desc was left in place. While not harmful,
remove this unnecessary extra reassignment.

Fixes: 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers")
Signed-off-by: Marijn Suijten &lt;marijn.suijten@somainline.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@somainline.org&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211208083423.22037-2-marijn.suijten@somainline.org
</content>
</entry>
<entry>
<title>Revert "firmware: qcom: scm: Add support for MC boot address API"</title>
<updated>2021-10-27T14:25:07Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2021-10-27T14:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7db2bc925e4642df6255612e5521af0423ada18a'/>
<id>urn:sha1:7db2bc925e4642df6255612e5521af0423ada18a</id>
<content type='text'>
This reverts commits 55845f46df03 and c50031f03dfe, since this still
causes a build failure when QCOM_SCM is a loadable module, or when
CONFIG_SMP is disabled:

ERROR: modpost: "cpu_logical_map" [drivers/firmware/qcom-scm.ko] undefined!

This be done better for 5.17, but it's too late now to rework
properly.

Fixes: c50031f03dfe ("firmware: qcom: scm: Don't break compile test on non-ARM platforms")
Fixes: 55845f46df03 ("firmware: qcom: scm: Add support for MC boot address API")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>firmware: qcom: scm: Don't break compile test on non-ARM platforms</title>
<updated>2021-10-25T19:21:34Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2021-10-25T02:58:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c50031f03dfe1c1462f326973ddc5f0db839fb68'/>
<id>urn:sha1:c50031f03dfe1c1462f326973ddc5f0db839fb68</id>
<content type='text'>
The introduction of __qcom_scm_set_boot_addr_mc() relies on
cpu_logical_map() and MPIDR_AFFINITY_LEVEL() from smp_plat.h, but only
ARM and ARM64 has this include file, so the introduction of this
dependency broke compile testing on e.g. x86_64.

Make the inclusion of smp_plat.h and the affected function depend on
ARM || ARM64 to allow the code to still be compiled.

Fixes: 55845f46df03 ("firmware: qcom: scm: Add support for MC boot address API")
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211025025816.2937465-1-bjorn.andersson@linaro.org
</content>
</entry>
</feed>
