From: Kalle Valo <kvalo@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Bjorn Andersson <quic_bjorande@quicinc.com>,
neil.armstrong@linaro.org,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Loic Poulain <loic.poulain@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 01/12] soc: qcom: add firmware name helper
Date: Fri, 31 May 2024 21:48:47 +0300 [thread overview]
Message-ID: <87ikytvmuo.fsf@kernel.org> (raw)
In-Reply-To: <pd3jgsd2ps73qd2h4rdxavd4zmyeqrqmslkbuwtgwlotm4tzgb@bb5japc6opcq> (Bjorn Andersson's message of "Tue, 28 May 2024 21:28:54 -0500")
Bjorn Andersson <andersson@kernel.org> writes:
> On Mon, May 27, 2024 at 02:42:44PM GMT, Dmitry Baryshkov wrote:
>
>> On Thu, 23 May 2024 at 01:48, Bjorn Andersson <quic_bjorande@quicinc.com> wrote:
>> >
>> > On Tue, May 21, 2024 at 03:08:31PM +0200, Dmitry Baryshkov wrote:
>> > > On Tue, 21 May 2024 at 13:20, Kalle Valo <kvalo@kernel.org> wrote:
>> > > >
>> > > > Dmitry Baryshkov <dmitry.baryshkov@linaro.org> writes:
>> > > >
>> > > > > On Tue, 21 May 2024 at 12:52, <neil.armstrong@linaro.org> wrote:
>> > > > >>
>> > > > >> On 21/05/2024 11:45, Dmitry Baryshkov wrote:
>> > > > >> > Qualcomm platforms have different sets of the firmware files, which
>> > > > >> > differ from platform to platform (and from board to board, due to the
>> > > > >> > embedded signatures). Rather than listing all the firmware files,
>> > > > >> > including full paths, in the DT, provide a way to determine firmware
>> > > > >> > path based on the root DT node compatible.
>> > > > >>
>> > > > >> Ok this looks quite over-engineered but necessary to handle the legacy,
>> > > > >> but I really think we should add a way to look for a board-specific path
>> > > > >> first and fallback to those SoC specific paths.
>> > > > >
>> > > > > Again, CONFIG_FW_LOADER_USER_HELPER => delays.
>> > > >
>> > > > To me this also looks like very over-engineered, can you elaborate more
>> > > > why this is needed? Concrete examples would help to understand better.
>> > >
>> > > Sure. During the meeting last week Arnd suggested evaluating if we can
>> > > drop firmware-name from the board DT files. Several reasons for that:
>> > > - DT should describe the hardware, not the Linux-firmware locations
>> > > - having firmware name in DT complicates updating the tree to use
>> > > different firmware API (think of mbn vs mdt vs any other format)
>> > > - If the DT gets supplied by the vendor (e.g. for
>> > > SystemReady-certified devices), there should be a sync between the
>> > > vendor's DT, linux kernel and the rootfs. Dropping firmware names from
>> > > DT solves that by removing one piece of the equation
>> > >
>> > > Now for the complexity of the solution. Each SoC family has their own
>> > > firmware set. This includes firmware for the DSPs, for modem, WiFi
>> > > bits, GPU shader, etc.
>> > > For the development boards these devices are signed by the testing key
>> > > and the actual signature is not validated against the root of trust
>> > > certificate.
>> > > For the end-user devices the signature is actually validated against
>> > > the bits fused to the SoC during manufacturing process. CA certificate
>> > > (and thus the fuses) differ from vendor to vendor (and from the device
>> > > to device)
>> > >
>> > > Not all of the firmware files are a part of the public linux-firmware
>> > > tree. However we need to support the rootfs bundled with the firmware
>> > > for different platforms (both public and vendor). The non-signed files
>> > > come from the Adreno GPU and can be shared between platforms. All
>> > > other files are SoC-specific and in some cases device-specific.
>> > >
>> > > So for example the SDM845 db845c (open device) loads following firmware files:
>> > > Not signed:
>> > > - qcom/a630_sqe.fw
>> > > - qcom/a630_gmu.bin
>> > >
>> > > Signed, will work for any non-secured sdm845 device:
>> > > - qcom/sdm845/a630_zap.mbn
>> > > - qcom/sdm845/adsp.mbn
>> > > - qcom/sdm845/cdsp.mbn
>> > > - qcom/sdm485/mba.mbn
>> > > - qcom/sdm845/modem.mbn
>> > > - qcom/sdm845/wlanmdsp.mbn (loaded via TQFTP)
>> > > - qcom/venus-5.2/venus.mbn
>> > >
>> > > Signed, works only for DB845c.
>> > > - qcom/sdm845/Thundercomm/db845c/slpi.mbn
>> > >
>> > > In comparison, the SDM845 Pixel-3 phone (aka blueline) should load the
>> > > following firmware files:
>> > > - qcom/a630_sqe.fw (the same, non-signed file)
>> > > - qcom/a630_gmu.bin (the same, non-signed file)
>> > > - qcom/sdm845/Google/blueline/a630_zap.mbn
>> >
>> > How do you get from "a630_zap.mbn" to this? By extending the lookup
>> > table for every target, or what am I missing?
>>
>> More or less so. Matching the root OF node gives us the firmware
>> location, then it gets prepended to all firmware targets. Not an ideal
>> solution, as there is no fallback support, but at least it gives us
>> some points to discuss (and to decide whether to move to some
>> particular direction or to abandon the idea completely, making Arnd
>> unhappy again).
>>
>
> I understand the desire to not put linux-firmware-specific paths in the
> DeviceTree
Me too.
> but I think I'm less keen on having a big lookup table in the
> kernel...
Yeah, also for me this feels wrong. But on the other hand I don't have
anything better to suggest either...
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-05-31 18:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 9:45 [PATCH 00/12] arm64: qcom: autodetect firmware paths Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 01/12] soc: qcom: add firmware name helper Dmitry Baryshkov
2024-05-21 9:52 ` neil.armstrong
2024-05-21 10:01 ` Dmitry Baryshkov
2024-05-21 11:20 ` Kalle Valo
2024-05-21 13:08 ` Dmitry Baryshkov
2024-05-22 22:48 ` Bjorn Andersson
2024-05-27 11:42 ` Dmitry Baryshkov
2024-05-29 2:28 ` Bjorn Andersson
2024-05-31 18:48 ` Kalle Valo [this message]
2024-05-21 9:45 ` [PATCH 02/12] wifi: wcn36xx: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-31 18:53 ` Kalle Valo
2024-05-21 9:45 ` [PATCH 03/12] soc: qcom: wcnss_ctrl: " Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 04/12] remoteproc: qcom_q6v5_mss: switch to mbn files by default Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 05/12] remoteproc: qcom_q6v5_mss: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 06/12] remoteproc: qcom_q6v5_pas: switch to mbn files by default Dmitry Baryshkov
2024-05-21 9:49 ` neil.armstrong
2024-05-21 10:01 ` Dmitry Baryshkov
2024-05-21 19:40 ` Bjorn Andersson
2024-05-21 9:45 ` [PATCH 07/12] remoteproc: qcom_q6v5_pas: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 08/12] remoteproc: qcom_wcnss: switch to mbn files by default Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 09/12] remoteproc: qcom_wcnss: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-22 19:21 ` Jeff Johnson
2024-05-22 20:42 ` Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 10/12] " Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 11/12] arm64: dts: qcom: apq8016-sbc: drop firmware-name properties Dmitry Baryshkov
2024-05-21 9:45 ` [PATCH 12/12] arm64: dts: qcom: apq8096-db820c: " Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikytvmuo.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=mathieu.poirier@linaro.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_bjorande@quicinc.com \
--cc=robh@kernel.org \
--cc=wcn36xx@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).