Starting app on i.MX8MM M4 core from DDR via remoteproc

Frieder Schrempf frieder.schrempf at kontron.de
Wed Mar 22 01:46:46 PDT 2023


Hello,

I'm having problems with running an application from DDR memory on the
M4 core of an i.MX8MM using remoteproc in Linux.

* starting the app compiled for internal RAM from Linux works fine
* starting the app compiled for DDR from U-Boot works fine
* starting the app compiled for DDR from Linux doesn't show any output
on the M4 debug UART

Below there is some more information on my setup. If anyone has an idea
for debugging this, please let me know.

Thanks
Frieder

* Kernel 6.3-rc3, but older versions show the same behavior
* M4 app is the HelloWorld example for the NXP EVK from the NXP
MCUXpresso SDK (v2.13.0)
* Devicetree entry for carving out the M4 apps memory area:

  reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;

        m4_reserved: m4 at 0x80000000 {
            reg = <0 0x80000000 0 0x1000000>;
            no-map;
        };
    };

    imx8mm-cm4 {
        compatible = "fsl,imx8mm-cm4";
        clocks = <&clk IMX8MM_CLK_M4_DIV>;
        memory-region = <&m4_reserved>;
	syscon = <&src>;
    };

* Kernel debug messages from remoteproc:

  ~# echo -n hello_world.elf > /sys/class/remoteproc/remoteproc0/firmware
  ~# echo start > /sys/class/remoteproc/remoteproc0/state
[   16.321669] remoteproc remoteproc0: powering up imx-rproc
[   16.339005] remoteproc remoteproc0: Firmware is an elf32 file
[   16.344811] remoteproc remoteproc0: Booting fw image hello_world.elf,
size 172988
[   16.352339] imx-rproc imx8mm-cm4: iommu not present
[   16.361694] imx-rproc imx8mm-cm4: map memory: 0000000067eba0ef+10000000
[   16.368370] remoteproc remoteproc0: phdr: type 1 da 0x80000000 memsz
0x240 filesz 0x240
[   16.381663] remoteproc remoteproc0: da = 0x80000000 len = 0x240 va =
0x000000005d9c21f9
[   16.389694] remoteproc remoteproc0: phdr: type 1 da 0x80000240 memsz
0x2908 filesz 0x2908
[   16.401658] remoteproc remoteproc0: da = 0x80000240 len = 0x2908 va =
0x00000000daf54708
[   16.409789] remoteproc remoteproc0: phdr: type 1 da 0x80200000 memsz
0x850 filesz 0x0
[   16.421658] remoteproc remoteproc0: da = 0x80200000 len = 0x850 va =
0x0000000042d1e7ab
[   16.429682] remoteproc remoteproc0: da = 0x80000240 len = 0x10 va =
0x00000000daf54708
[   16.441665] remoteproc remoteproc0: remote processor imx-rproc is now up



More information about the linux-arm-kernel mailing list