Alright, I’m now on my 7th week at Aeste. Things been going pretty fast ey? Yeah it sure  does! This week I managed to finish my dummy remoteproc driver. It was a big relieve for me because my stress level was going up rapidly when the driver didn’t work after numerous debugs! Like always, I’ll write here one of my most stupid mistakes that I did so that me, you, and everyone else on this planet won’t do the same mistakes again!

One of my most stupid mistakes was that I passed the wrong object to a function. I was pretty sure the object that I passed was the one needed by the function but unfortunately no! Only after reading my codes several times that I realized this mistake of mine. After fixing this problem, another problem appeared.

Here’s my way of creating a dummy remoteproc:

I created a module that registers a platform device named “rproc” for example.

and then I insert the remoteproc module that I wrote. This module will specifically search for a platform device named “rproc”. As it was already inserted earlier, it will get probed by the kernel automatically. In this probe function, I allocate a portion of memory that will act as the remote processor’s RAM, and this is where the firmware will be uploaded during the boot up process.

To make the whole process simpler, I call the remoteproc boot up function during the device probe. This means that once the remote processor gets probed, the boot up function will be called and the remoteproc framework will look for the firmware to upload at the processor’s RAM. I had a little problem with this firmware loading mechanism because I didn’t have a real and proper firmware to be used (a firmware with a proper header and resource table). So, I modified the “find resource table” function of my remoteproc module and make this function create a fake resource table. Now that I have a resource table, the remoteproc framework won’t have any problem verifying the firmware resource, and then upload it to the RAM of my remote processor!

The first step of the remoteproc implementation is now done. My next task is to develop a small module that gives users the ability to peek into the remoteprocessor’s RAM. I tried to implement a virtual remoteproc UART so that I can access the remote processor’s resource through a serial console. But there was a slight problem, and I still couldn’t debug it even after spending a lot of time on it. Because there were too much time wasted on the problematic virtual UART, my supervisor asked me to start developing something simple first, such as a device file that do R/W on local memory. After this has been achieved I should start expanding its features till I get a complete module that will serves the functionality of a virtual UART.


Rebecca Chan · 2020-11-30 at 17:02

Hi! I know it has been awhile since this article was published, but I wonder if there is a step-by-step tutorial / document as to how you used the remoteproc framework? Specifically how you wrote a dummy driver, a fake resource table and how you linked it all together. I am learning on this too; however, there are too little tools online and they are too obscure as I am a beginner. I have gone through the GitHub as well as read the Linux documentation, but I still find the information overwhelming with many missing gaps. Any help you could provide would be great, thanks!

    Administrator · 2020-12-01 at 14:38

    Apologies but we’ve not been working on this for a number of years now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.