[U-Boot] [PATCH 1/5] remoteproc: elf_loader: Add elf resource table load support

Simon Glass sjg at chromium.org
Wed Oct 30 01:49:44 UTC 2019


Hi Fabien,

On Tue, 22 Oct 2019 at 03:08, Fabien DESSENNE <fabien.dessenne at st.com> wrote:
>
> Hi Simon,
>
>
> On 22/10/2019 1:47 AM, Simon Glass wrote:
> > Hi Fabien,
> >
> > On Wed, 9 Oct 2019 at 09:36, Fabien Dessenne <fabien.dessenne at st.com> wrote:
> >> Add rproc_elf_load_rsc_table(), which searches for a resource table in
> >> an elf64/elf32 image, and if found, copies it to device memory.
> >> Add also the elf32 and elf64 variants of this API.
> >> Add a test for this.
> >>
> >> Signed-off-by: Fabien Dessenne <fabien.dessenne at st.com>
> >> ---
> >>   drivers/remoteproc/rproc-elf-loader.c | 269 ++++++++++++++++++++++++++++++++++
> >>   include/remoteproc.h                  |  70 +++++++++
> >>   test/dm/remoteproc.c                  |  91 ++++++++++--
> >>   3 files changed, 419 insertions(+), 11 deletions(-)
> >>
> > If you are putting stuff in the image, should you use binman to build
> > the image, then find the contents using the binman tables?
>
>
> The "resource table" may be located anywhere, there is no strict rule
> defining where it is expected to be.
>
> Nevertheless the Linux remoteproc[1] and OpenAmp (running RTOS) [2]
> frameworks expect the resource table to be stored in a dedicated ELF
> section. Both of them run some ELF scanning to find out this section.
>
> The proposed patch is for the "ELF section" variant of the resource table.
> Other variants like binman packing may be proposed as well, both
> implementations can coexist alongside.

So why not use binman to pack the image and find the components? This
is U-Boot, after all.


>
> BR
>
> Fabien
>
> [1] https://www.kernel.org/doc/Documentation/remoteproc.txt
> [2]
> https://github.com/OpenAMP/open-amp/blob/master/lib/remoteproc/elf_loader.c
>
> >
> > Scanning the image for a table seems a bit horrible.

Regards,
Simon


More information about the U-Boot mailing list