UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer maerkl24
Observer
208 Views
Registered: ‎10-05-2018

understanding remoteproc functionality

Jump to solution

Hey guys,

I try to understand how the (linux) remoteproc functionality works. I'm working on a UltraScale+ platform and I'm running linux on the A53 cores and loading some bare metal applications with remoteproc from linux to the R5 cores. Everything works fine but I try to understand how it works.

 

My Device Tree looks something like that (this is not the whole Device Tree the ... are indicating missing lines):

reserved-memory {
        #address-cells = <2>;				/* 64Bit */
        #size-cells = <2>;				/* 64Bit */
        ranges;
        
        /* Reserved memory in DDR region for R5_0 ELF */
        reserved_memory_r5_0_elf: rproc@1F800000 {
            no-map;
            reg = <0x0 0x1F800000 0x0 0x400000>;	/* 4MB */
        };
        
        ...
amba {
        ...
        
        /* TCM_A for R5_0 */
        r5_0_tcm_a: tcm@FFE00000 {
            compatible = "mmio-sram";
            reg = <0x0 0xFFE00000 0x0 0x10000>;		/* 64KB */
            pd-handle = <&pd_tcm_0_a>;			/* TCM_0_A power domain (for R5_0) */
        };
        
        /* TCM_B for R5_0 */
        r5_0_tcm_b: tcm@FFE20000 {
            compatible = "mmio-sram";
            reg = <0x0 0xFFE20000 0x0 0x10000>;		/* 64KB */
            pd-handle = <&pd_tcm_0_b>;			/* TCM_0_B power domain (for R5_0) */
        };
        
        /* DDR memory for R5_0 ELF File */
        elf_ddr_0: ddr@3C000000 {
            compatible = "mmio-sram";
            reg = <0x0 0x3C00000 0x0 0x400000>;		/* 4MB */
        };
        
        /* Remoteproc for R5_0 */
        test_r50: zynqmp_r5_rproc@0 {
            compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
            reg = <0x0 0xFF9A0100 0 0x100>, <0x0 0xFF9A0000 0 0x100>;
            reg-names = "rpu_base", "rpu_glbl_base";
            dma-ranges;
            core_conf = "split0";
            srams = <&r5_0_tcm_a &r5_0_tcm_b &elf_ddr_0>;
            pd-handle = <&pd_r5_0>;
        };
        
        ...

My Linker script of the R5_0 core looks something like that:image.png

 

 

 

 

 

 

 

All sections are mapped to TCM_A or TCM_B, so no section is mapped to the DDR region .

 

What i think what it is doing:

I think remoteproc loads the ELF file to the specified RAM region (Device Tree remoteproc node) and hands off to the R5 core. The R5 core splits the differnt parts of the ELF file (stored in RAM) into the TCMs, to the regions which are specified in the linker script. After that the R5 core starts executing.

 

My questions are:

What is remoteproc doing step-by-step?

Who (R5 or A53) is splitting the ELF file to the memory regions which are specfied in the linker script? 

Is a RAM region neccessary for remoteproc functionality or are the TCMs maybe enougth?

Is the RAM region usealbe for the linker script or is it just to exchange  the ELF file from A53 to R5?

 

best regards,

Kilian

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
155 Views
Registered: ‎05-10-2017

Re: understanding remoteproc functionality

Jump to solution

Kernel doc about remoteproc here will be useful

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/remoteproc.txt

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
1 Reply
Moderator
Moderator
156 Views
Registered: ‎05-10-2017

Re: understanding remoteproc functionality

Jump to solution

Kernel doc about remoteproc here will be useful

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/remoteproc.txt

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------