From: Loic PALLARDY <loic.pallardy@st.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 6/8] remoteproc: Move resource table load logic to find
Date: Thu, 14 Dec 2017 20:12:19 +0000 [thread overview]
Message-ID: <708d06ce6cb540e785c34bd0a1d2d083@SFHDAG7NODE2.st.com> (raw)
In-Reply-To: <20171214194747.GV17344@builder>
> -----Original Message-----
> From: linux-remoteproc-owner@vger.kernel.org [mailto:linux-remoteproc-
> owner@vger.kernel.org] On Behalf Of Bjorn Andersson
> Sent: Thursday, December 14, 2017 8:48 PM
> To: Loic PALLARDY <loic.pallardy@st.com>
> Cc: Ohad Ben-Cohen <ohad@wizery.com>; linux-
> remoteproc@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 6/8] remoteproc: Move resource table load logic to find
>
> On Thu 14 Dec 04:00 PST 2017, Loic PALLARDY wrote:
> > > -----Original Message-----
> > > From: linux-remoteproc-owner@vger.kernel.org [mailto:linux-
> remoteproc-
> > > owner@vger.kernel.org] On Behalf Of Bjorn Andersson
> [..]
> > > +int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware
> *fw)
> > > {
> > > struct elf32_hdr *ehdr;
> > > struct elf32_shdr *shdr;
> > > struct device *dev = &rproc->dev;
> > > struct resource_table *table = NULL;
> > > const u8 *elf_data = fw->data;
> > > + size_t tablesz;
> > >
> > > ehdr = (struct elf32_hdr *)elf_data;
> > >
> > > shdr = find_table(dev, ehdr, fw->size);
> > > if (!shdr)
> > > - return NULL;
> > > + return -EINVAL;
> > Reading patch 7, I don't catch how firmware without resource table are
> > supported as if no table found, an error is returned here.
> > In rproc_fw_boot, you have:
> > ret = rproc_load_rsc_table(rproc, fw);
> > if (ret)
> > goto disable_iommu;
> > So boot process is interrupted...
> >
>
> When a driver registers a remoteproc with load_rsc_table specified that
> implies that the resource table is not optional as such it's an error to
> not find one.
>
> A driver that expects to load firmware without a resource table, such as
> st_slim_rproc with it's dummy resource table would set load_rsc_table to
> NULL.
Yes I saw that if no load_rsc_table, 0 is returned. Thanks for the explanations, I'll apply the series and review final code.
Regards,
Loic
>
>
> So the purpose is to maintain the current requirements, with the
> addition of removing the dummy implementations of find_rsc_table.
>
> Regards,
> Bjorn
> --
> To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-12-14 20:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 22:41 [PATCH 0/8] Remoteproc cleanups Bjorn Andersson
2017-12-13 22:41 ` [PATCH 1/8] remoteproc: Remove depricated crash completion Bjorn Andersson
2017-12-13 22:41 ` [PATCH 2/8] remoteproc: Cache resource table size Bjorn Andersson
2017-12-13 22:41 ` [PATCH 3/8] remoteproc: Clone rproc_ops in rproc_alloc() Bjorn Andersson
2017-12-13 22:41 ` [PATCH 4/8] remoteproc: Merge rproc_ops and rproc_fw_ops Bjorn Andersson
2017-12-13 22:41 ` [PATCH 5/8] remoteproc: Don't handle empty resource table Bjorn Andersson
2017-12-13 22:41 ` [PATCH 6/8] remoteproc: Move resource table load logic to find Bjorn Andersson
2017-12-14 11:25 ` Loic PALLARDY
2017-12-14 19:25 ` Bjorn Andersson
2017-12-14 12:00 ` Loic PALLARDY
2017-12-14 19:47 ` Bjorn Andersson
2017-12-14 20:12 ` Loic PALLARDY [this message]
2017-12-13 22:41 ` [PATCH 7/8] remoteproc: Drop dangling find_rsc_table dummies Bjorn Andersson
2018-01-05 16:53 ` Loic PALLARDY
2018-01-05 18:50 ` Bjorn Andersson
2018-01-08 8:14 ` Loic PALLARDY
2017-12-13 22:41 ` [PATCH 8/8] remoteproc: Reset table_ptr on stop Bjorn Andersson
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=708d06ce6cb540e785c34bd0a1d2d083@SFHDAG7NODE2.st.com \
--to=loic.pallardy@st.com \
--cc=bjorn.andersson@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.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
all inboxes | Powered by JetHome®