From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Dikshita Agarwal <quic_dikshita@quicinc.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-media@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v2 06/11] remoteproc: Move resource table data structure to its own header
Date: Wed, 20 Aug 2025 17:31:21 +0200 [thread overview]
Message-ID: <aKXqSU-487b6Je2B@linaro.org> (raw)
In-Reply-To: <20250820151822.6cmowxfsheqxfrnb@hu-mojha-hyd.qualcomm.com>
On Wed, Aug 20, 2025 at 08:48:22PM +0530, Mukesh Ojha wrote:
> On Wed, Aug 20, 2025 at 10:12:15AM +0200, Stephan Gerhold wrote:
> > On Tue, Aug 19, 2025 at 10:24:41PM +0530, Mukesh Ojha wrote:
> > > The resource table data structure has traditionally been associated with
> > > the remoteproc framework, where the resource table is included as a
> > > section within the remote processor firmware binary. However, it is also
> > > possible to obtain the resource table through other means—such as from a
> > > reserved memory region populated by the boot firmware, statically
> > > maintained driver data, or via a secure SMC call—when it is not embedded
> > > in the firmware.
> > >
> > > There are multiple Qualcomm remote processors (e.g., Venus, Iris, GPU,
> > > etc.) in the upstream kernel that do not use the remoteproc framework to
> > > manage their lifecycle for various reasons.
> > >
> > > When Linux is running at EL2, similar to the Qualcomm PAS driver
> > > (qcom_q6v5_pas.c), client drivers for subsystems like video and GPU may
> > > also want to use the resource table SMC call to retrieve and map
> > > resources before they are used by the remote processor.
> > >
> >
> > All the examples you give here (Venus/Iris, GPU) have some sort of EL2
> > support already for older platforms:
>
> Example was taken from perspective of remote processor life-cycle management.
> You are right they have worked before in non-secure way for Chrome.
>
> >
> > - For GPU, we just skip loading the ZAP shader and access the protected
> > registers directly. I would expect the ZAP shader does effectively
> > the same, perhaps with some additional handling for secure mode. Is
> > this even a real remote processor that has a separate IOMMU domain?
> >
>
> I don't think it is the case and think the same that they can skip
> loading and Hence, I have not yet added support for it.
>
> Will check internally before doing anything on GPU.
>
> > - For Venus/Iris, there is code upstream similar to your PATCH 11/11
> > that maps the firmware with the IOMMU (but invokes reset directly
> > using the registers, without using PAS). There is no resource table
> > used for that either, so at least all Venus/Iris versions so far
> > apparently had no need for any mappings aside from the firmware
> > binary.
>
> You are absolutely right
>
> >
> > I understand that you want to continue using PAS for these, but I'm a
> > bit confused what kind of mappings we would expect to have in the
> > resource table for video and GPU. Could you give an example?
>
> We have some debug hw tracing available for video for lemans, which is
> optional However, I believe infra is good to have incase we need some
> required resources to be map for Video to work for a SoC.
>
Thanks for the clarification.
Personally, I'm a bit concerned about the code duplication in PATCH
08/11, I think parsing the resource table should ideally be code shared
between the remoteproc subsystem and whereever else you need it. The way
you parse it and handle the IOMMU mappings is largely the same, you just
don't support all of the resource table functionality. Have you checked
if sharing the code would be feasible?
If there is no upstream requirement for this right now, you might want
to consider handling this in a follow up series, after you get the
required functionality in. This would reduce the amount of changes in
your series quite a bit.
Thanks,
Stephan
next prev parent reply other threads:[~2025-08-20 15:31 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 16:54 [PATCH v2 00/11] Peripheral Image Loader support for Qualcomm SoCs running Linux host at EL2 Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 01/11] firmware: qcom_scm: Introduce PAS context initialization helper Mukesh Ojha
2025-08-19 17:17 ` Pavan Kondeti
2025-08-20 6:19 ` Mukesh Ojha
2025-08-20 11:40 ` Bryan O'Donoghue
2025-08-20 12:28 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 02/11] soc: qcom: mdtloader: Add context aware qcom_mdt_pas_load() helper Mukesh Ojha
2025-08-20 11:48 ` Bryan O'Donoghue
2025-08-20 12:25 ` Mukesh Ojha
2025-09-03 15:03 ` Bryan O'Donoghue
2025-09-04 9:52 ` Mukesh Ojha
2025-09-04 10:15 ` Bryan O'Donoghue
2025-09-04 11:43 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 03/11] firmware: qcom_scm: Add a prep version of auth_and_reset function Mukesh Ojha
2025-08-20 12:03 ` Bryan O'Donoghue
2025-08-20 12:24 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 04/11] firmware: qcom_scm: Simplify qcom_scm_pas_init_image() Mukesh Ojha
2025-08-21 14:36 ` Bryan O'Donoghue
2025-08-21 16:29 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 05/11] firmware: qcom_scm: Add shmbridge support to pas_init/release function Mukesh Ojha
2025-08-21 15:23 ` Bryan O'Donoghue
2025-08-21 17:03 ` Mukesh Ojha
2025-08-22 16:52 ` Mukesh Ojha
2025-08-22 23:13 ` Bryan O'Donoghue
2025-08-19 16:54 ` [PATCH v2 06/11] remoteproc: Move resource table data structure to its own header Mukesh Ojha
2025-08-20 8:12 ` Stephan Gerhold
2025-08-20 15:18 ` Mukesh Ojha
2025-08-20 15:31 ` Stephan Gerhold [this message]
2025-08-22 7:56 ` Mukesh Ojha
2025-08-20 16:32 ` Mukesh Ojha
2025-08-20 16:53 ` Stephan Gerhold
2025-08-22 9:21 ` Mukesh Ojha
2025-08-22 8:35 ` Krzysztof Kozlowski
2025-08-22 9:30 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 07/11] firmware: qcom_scm: Add qcom_scm_pas_get_rsc_table() to get resource table Mukesh Ojha
2025-08-21 15:05 ` Krzysztof Kozlowski
2025-08-21 17:20 ` Mukesh Ojha
2025-08-22 6:22 ` Krzysztof Kozlowski
2025-08-22 7:21 ` Mukesh Ojha
2025-08-22 8:30 ` Krzysztof Kozlowski
2025-08-19 16:54 ` [PATCH v2 08/11] soc: qcom: mdt_loader: Add helper functions to map and unmap resources Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 09/11] remoteproc: pas: Extend parse_fw callback to parse resource table Mukesh Ojha
2025-08-20 8:36 ` Stephan Gerhold
2025-08-20 11:14 ` Mukesh Ojha
2025-08-20 13:07 ` Stephan Gerhold
2025-08-21 14:49 ` Krzysztof Kozlowski
2025-08-21 17:41 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 10/11] remoteproc: qcom: pas: Enable Secure PAS support with IOMMU managed by Linux Mukesh Ojha
2025-08-20 8:40 ` Stephan Gerhold
2025-08-20 12:03 ` Mukesh Ojha
2025-08-19 16:54 ` [PATCH v2 11/11] media: iris: " Mukesh Ojha
2025-08-20 8:46 ` Stephan Gerhold
2025-08-20 11:56 ` Mukesh Ojha
2025-08-20 13:39 ` Stephan Gerhold
2025-08-22 4:26 ` Vikash Garodia
2025-08-22 8:46 ` Stephan Gerhold
2025-08-22 15:06 ` Mukesh Ojha
2025-08-22 16:26 ` Stephan Gerhold
2025-08-22 16:40 ` Mukesh Ojha
2025-08-23 20:43 ` Stephan Gerhold
2025-08-25 11:19 ` Mukesh Ojha
2025-08-20 11:33 ` Bryan O'Donoghue
2025-08-20 12:00 ` Mukesh Ojha
2025-08-22 8:45 ` Krzysztof Kozlowski
2025-08-22 15:13 ` Mukesh Ojha
2025-08-23 15:41 ` Krzysztof Kozlowski
2025-08-23 15:46 ` Krzysztof Kozlowski
2025-08-23 15:52 ` Krzysztof Kozlowski
2025-08-20 11:03 ` [PATCH v2 00/11] Peripheral Image Loader support for Qualcomm SoCs running Linux host at EL2 Bryan O'Donoghue
2025-08-20 11:22 ` Mukesh Ojha
2025-09-03 11:56 ` Konrad Dybcio
2025-09-03 13:31 ` Bryan O'Donoghue
2025-09-03 14:02 ` Dmitry Baryshkov
2025-09-03 14:05 ` Bryan O'Donoghue
2025-09-03 14:13 ` Bryan O'Donoghue
2025-09-03 14:21 ` Bryan O'Donoghue
2025-09-03 14:28 ` 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=aKXqSU-487b6Je2B@linaro.org \
--to=stephan.gerhold@linaro.org \
--cc=abhinav.kumar@linux.dev \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mchehab@kernel.org \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
/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).