All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabien DESSENNE <fabien.dessenne@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] remoteproc: elf_loader: Add elf resource table load support
Date: Tue, 22 Oct 2019 09:08:28 +0000	[thread overview]
Message-ID: <9a098f3c-250c-d589-70d3-6dcfe0fbdc93@st.com> (raw)
In-Reply-To: <CAPnjgZ33+J-10WgcmFBjGuqJ90caJFj7mGy+vApbxAyymCXvZw@mail.gmail.com>

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@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@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.

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

  reply	other threads:[~2019-10-22  9:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 15:36 [U-Boot] [PATCH 0/5] remoteproc: add elf resource table loader Fabien Dessenne
2019-10-09 15:36 ` [U-Boot] [PATCH 1/5] remoteproc: elf_loader: Add elf resource table load support Fabien Dessenne
2019-10-21 23:47   ` Simon Glass
2019-10-22  9:08     ` Fabien DESSENNE [this message]
2019-10-30  1:49       ` Simon Glass
2019-10-30  9:50         ` Fabien DESSENNE
2019-12-10 15:18           ` Simon Glass
2019-12-10 16:32             ` Fabien DESSENNE
2019-12-10 16:36             ` Fabien DESSENNE
2019-10-09 15:36 ` [U-Boot] [PATCH 2/5] stm32mp1: declare backup register for copro resource table address Fabien Dessenne
2019-10-09 15:36 ` [U-Boot] [PATCH 3/5] remoteproc: stm32: load resource table from firmware Fabien Dessenne
2019-10-11 20:09   ` Suman Anna
2019-10-14 15:53     ` Fabien DESSENNE
2019-10-09 15:36 ` [U-Boot] [PATCH 4/5] stm32mp1: Fixup the Linux DeviceTree with coprocessor information Fabien Dessenne
2019-10-11 19:57   ` Suman Anna
2019-10-14 15:50     ` Fabien DESSENNE
2019-10-09 15:36 ` [U-Boot] [PATCH 5/5] remoteproc: stm32: invert the is_running() return value Fabien Dessenne
2019-10-11 20:00   ` Suman Anna
2019-10-14 15:50     ` Fabien DESSENNE

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=9a098f3c-250c-d589-70d3-6dcfe0fbdc93@st.com \
    --to=fabien.dessenne@st.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.