* [RFC] Passing device-tree to remoteproc?
@ 2024-01-23 13:32 Yann Sionneau
2024-01-30 10:20 ` Yann Sionneau
0 siblings, 1 reply; 5+ messages in thread
From: Yann Sionneau @ 2024-01-23 13:32 UTC (permalink / raw)
To: linux-remoteproc
Cc: Bjorn Andersson, Mathieu Poirier, Julian Vetter, Jonathan Borne,
Arnaud POULIQUEN, Julien Hascoet, Damien Hedde, Titouan Huard
Hello,
How interesting to upstream Linux would it be to have a way for Linux
kernel or user space to pass a device tree blob to remote processor when
starting a remote proc FW?
For instance we could imagine something like this:
1/ user space does echo -n firmware.elf >
/sys/class/remoteproc/remoteprocXXX/firmware
2/ user space does echo -n my_dt.dtb >
/sys/class/remoteproc/remoteprocXXX/dtb
3/ user space does echo start > /sys/class/remoteproc/remoteprocXXX/state
We could also imagine that the kernel could load its own device tree
into memory and puts the address to this memory zone in a resource of
the resource table if some resource type is found.
But I think the user space based approach is more flexible as you could
potentially specify a different DTB from the kernel itself.
What do you think?
Regards,
--
Yann
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] Passing device-tree to remoteproc?
2024-01-23 13:32 [RFC] Passing device-tree to remoteproc? Yann Sionneau
@ 2024-01-30 10:20 ` Yann Sionneau
2024-02-02 9:14 ` Arnaud POULIQUEN
0 siblings, 1 reply; 5+ messages in thread
From: Yann Sionneau @ 2024-01-30 10:20 UTC (permalink / raw)
To: linux-remoteproc
Cc: Bjorn Andersson, Mathieu Poirier, Julian Vetter, Jonathan Borne,
Arnaud POULIQUEN, Julien Hascoet, Damien Hedde, Titouan Huard
Hello,
On 1/23/24 14:32, Yann Sionneau wrote:
> Hello,
>
> How interesting to upstream Linux would it be to have a way for Linux
> kernel or user space to pass a device tree blob to remote processor
> when starting a remote proc FW?
>
> For instance we could imagine something like this:
>
> 1/ user space does echo -n firmware.elf >
> /sys/class/remoteproc/remoteprocXXX/firmware
>
> 2/ user space does echo -n my_dt.dtb >
> /sys/class/remoteproc/remoteprocXXX/dtb
>
> 3/ user space does echo start > /sys/class/remoteproc/remoteprocXXX/state
Any opinion on this proposal?
Thanks!
Regards,
--
Yann
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] Passing device-tree to remoteproc?
2024-01-30 10:20 ` Yann Sionneau
@ 2024-02-02 9:14 ` Arnaud POULIQUEN
2024-02-05 21:05 ` Mathieu Poirier
0 siblings, 1 reply; 5+ messages in thread
From: Arnaud POULIQUEN @ 2024-02-02 9:14 UTC (permalink / raw)
To: Yann Sionneau, linux-remoteproc
Cc: Bjorn Andersson, Mathieu Poirier, Julian Vetter, Jonathan Borne,
Julien Hascoet, Damien Hedde, Titouan Huard
Hello Yann,
On 1/30/24 11:20, Yann Sionneau wrote:
> Hello,
>
> On 1/23/24 14:32, Yann Sionneau wrote:
>> Hello,
>>
>> How interesting to upstream Linux would it be to have a way for Linux kernel
>> or user space to pass a device tree blob to remote processor when starting a
>> remote proc FW?
>>
>> For instance we could imagine something like this:
>>
>> 1/ user space does echo -n firmware.elf >
>> /sys/class/remoteproc/remoteprocXXX/firmware
>>
>> 2/ user space does echo -n my_dt.dtb > /sys/class/remoteproc/remoteprocXXX/dtb
>>
>> 3/ user space does echo start > /sys/class/remoteproc/remoteprocXXX/state
>
> Any opinion on this proposal?
Interesting use case. There is no concrete need in ST, but it raises the
question of providing extra data with the firmware to the remote processor.
In a first approach, my personal feeling is that the ELF and the DTB are
interdependent.
So having a mechanism to ensure coherency between both could be important.
Then it could be interesting to address the need in a more generic way
to be able to transfer extra data, for instance an audio tuning for a DSP.
Adding a specific sysfs for each specific need could not be a good idea in long
term.
Have you looked into some other approaches such as adding the DTB as a specific
section of your ELF file,or adding the support of a new format that packages
everything together (for instance FIP)?
Regards,
Arnaud
>
> Thanks!
>
> Regards,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] Passing device-tree to remoteproc?
2024-02-02 9:14 ` Arnaud POULIQUEN
@ 2024-02-05 21:05 ` Mathieu Poirier
2024-02-19 16:17 ` Yann Sionneau
0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Poirier @ 2024-02-05 21:05 UTC (permalink / raw)
To: Arnaud POULIQUEN
Cc: Yann Sionneau, linux-remoteproc, Bjorn Andersson, Julian Vetter,
Jonathan Borne, Julien Hascoet, Damien Hedde, Titouan Huard
Good day Yann,
On Fri, Feb 02, 2024 at 10:14:08AM +0100, Arnaud POULIQUEN wrote:
> Hello Yann,
>
> On 1/30/24 11:20, Yann Sionneau wrote:
> > Hello,
> >
> > On 1/23/24 14:32, Yann Sionneau wrote:
> >> Hello,
> >>
> >> How interesting to upstream Linux would it be to have a way for Linux kernel
> >> or user space to pass a device tree blob to remote processor when starting a
> >> remote proc FW?
> >>
> >> For instance we could imagine something like this:
> >>
> >> 1/ user space does echo -n firmware.elf >
> >> /sys/class/remoteproc/remoteprocXXX/firmware
> >>
> >> 2/ user space does echo -n my_dt.dtb > /sys/class/remoteproc/remoteprocXXX/dtb
> >>
> >> 3/ user space does echo start > /sys/class/remoteproc/remoteprocXXX/state
> >
> > Any opinion on this proposal?
>
>
> Interesting use case. There is no concrete need in ST, but it raises the
> question of providing extra data with the firmware to the remote processor.
>
I agree with Arnaud. From a mechanical point of view it is interesting and
doesn't pause a serious technical challenge. That said I don't really
understand the motivation behind the idea. More details the exact problem you
want to fix would be welcomed.
> In a first approach, my personal feeling is that the ELF and the DTB are
> interdependent.
> So having a mechanism to ensure coherency between both could be important.
>
> Then it could be interesting to address the need in a more generic way
> to be able to transfer extra data, for instance an audio tuning for a DSP.
> Adding a specific sysfs for each specific need could not be a good idea in long
> term.
>
> Have you looked into some other approaches such as adding the DTB as a specific
> section of your ELF file,or adding the support of a new format that packages
> everything together (for instance FIP)?
Here too I have to agree with Arnaud.
> Regards,
> Arnaud
>
> >
> > Thanks!
> >
> > Regards,
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] Passing device-tree to remoteproc?
2024-02-05 21:05 ` Mathieu Poirier
@ 2024-02-19 16:17 ` Yann Sionneau
0 siblings, 0 replies; 5+ messages in thread
From: Yann Sionneau @ 2024-02-19 16:17 UTC (permalink / raw)
To: Mathieu Poirier, Arnaud POULIQUEN
Cc: linux-remoteproc, Bjorn Andersson, Julian Vetter, Jonathan Borne,
Julien Hascoet, Damien Hedde, Titouan Huard
Hello Arnaud, Mathieu,
On 2/5/24 22:05, Mathieu Poirier wrote:
> Good day Yann,
>
> On Fri, Feb 02, 2024 at 10:14:08AM +0100, Arnaud POULIQUEN wrote:
>> Hello Yann,
>>
>> On 1/30/24 11:20, Yann Sionneau wrote:
>>> Hello,
>>>
>>> On 1/23/24 14:32, Yann Sionneau wrote:
>>>> Hello,
>>>>
>>>> How interesting to upstream Linux would it be to have a way for Linux kernel
>>>> or user space to pass a device tree blob to remote processor when starting a
>>>> remote proc FW?
>>>>
>>>> For instance we could imagine something like this:
>>>>
>>>> 1/ user space does echo -n firmware.elf >
>>>> /sys/class/remoteproc/remoteprocXXX/firmware
>>>>
>>>> 2/ user space does echo -n my_dt.dtb > /sys/class/remoteproc/remoteprocXXX/dtb
>>>>
>>>> 3/ user space does echo start > /sys/class/remoteproc/remoteprocXXX/state
>>> Any opinion on this proposal?
>> Interesting use case. There is no concrete need in ST, but it raises the
>> question of providing extra data with the firmware to the remote processor.
>>
> I agree with Arnaud. From a mechanical point of view it is interesting and
> doesn't pause a serious technical challenge. That said I don't really
> understand the motivation behind the idea. More details the exact problem you
> want to fix would be welcomed.
>
>> In a first approach, my personal feeling is that the ELF and the DTB are
>> interdependent.
>> So having a mechanism to ensure coherency between both could be important.
>>
>> Then it could be interesting to address the need in a more generic way
>> to be able to transfer extra data, for instance an audio tuning for a DSP.
>> Adding a specific sysfs for each specific need could not be a good idea in long
>> term.
>>
>> Have you looked into some other approaches such as adding the DTB as a specific
>> section of your ELF file,or adding the support of a new format that packages
>> everything together (for instance FIP)?
Our use case: passing the CPU frequency to the remote processor fw (in
the future we might even need to pass other things like device nodes).
On other use cases we do indeed stuff the dtb into the ELF `.dtb`
section and it works well, so I think indeed it solves our problem in
the remoteproc case as well.
However, as you said, it's even cleaner to use FIP or FIT images to
ensure tight link between the ELF and the dtb (it could even allow to do
signature verification).
I hope our use case is more clear now :)
Thanks a lot for your answers!
Regards,
--
Yann
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-19 16:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 13:32 [RFC] Passing device-tree to remoteproc? Yann Sionneau
2024-01-30 10:20 ` Yann Sionneau
2024-02-02 9:14 ` Arnaud POULIQUEN
2024-02-05 21:05 ` Mathieu Poirier
2024-02-19 16:17 ` Yann Sionneau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox