RPMSG M4 assertion "NULL != info->isr" failed


I need to use RPMSG and DDR memory on M4. When memargs in uboot is empty, everythings works fine, except i don’t have access to DDR memory on M4. When I try to pass mem=512M or mem=1000M M4 stops with message

assertion "NULL != info->isr" failed: file "../sources/middleware/multicore/open-amp/porting/env/bm/rpmsg_porting.c", line 483, function: env_isr

M4 works when mem=240M but not always.

How can I use RPMSG and DDR at the same time on M4 core?
I saw

#define VRING0_BASE 0x8FFF0000
#define VRING1_BASE 0x8FFF8000

in rpmsg_demo but same addresses is hardcoded in virtio kernel module.


I saw iMX7 Linux and FreeRTOS sharing ram
and I found that you reserve 2MB for M4.

cat /proc/iomem 

 80000000-8fdfffff : System RAM
 80008000-80862c67 : Kernel code
 808b2000-8095c1ab : Kernel data
 90000000-bfffffff : System RAM

so can I safetly use 0x8fe00000 space for M4 (without 0x8FFF0000- 0x90000000) ?


Dear @p.machura

For the rpmsg processing, Linux reserves

  • 64kB of DDR starting at 0x8FFF0000
    for queue managment
  • 64kB of DDR starting at 0x8FFF8000
    for queue management
  • Additional DRAM for the actual data transferred through rpmsg.
    The allocation of this space is done during the initialization of the rpmsg system at a dynamic location.

There is no DRAM reserved for M4 code or application data. Did you place your application into the DRAM, and you end up with the ASSERT because the DRAM is overwritten by Linux?
Anyway for performance reasons I highly recommend to place your application data. into the tightly coupled memory (TCM) whenever possible.

If you need additional DRAM to transfer data between the M4 and Linux, you need to write a simple Linux driver which can access this DRAM area, and modify the device tree to reserve the prevent the memory from being used by the system.

Regards, Andy

U-Boot reserves memory at the end of the 256MiB region and passes that to Linux using device tree, see also this two changes:

I think when you use memargs Linux does its own allocation and ignores the usable memory range as passed through device tree. Then the M4 writes in some memory region used by Linux, which can lead to all sorts of crashes.

As with the second patch we increased the carved out region to 2MiB, it is save to use 1MiB @ 0x8fe00000 for the M4.


I’m using MCIMX7D_M4_ocram.ld so M4 application works on builtin RAM.

I need to use DRAM to store ~1MB data on M4 side, before linux will ask for them.

Assert sometimes shows up on M4 console while linux is booting with mem=240M.
I tried this mem settings to left some DRAM for M4.

When booting with mem=1000M i get:

    WARNING: CPU: 0 PID: 1 at /workdir/build/tmp-glibc/work-shared/colibri-imx7-emmc/kernel-source/arch/arm/mm/ioremap.c:301 

    [    0.144824] Modules linked in:
    [    0.144854] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.44-2.7.4+gb1555bf #1
    [    0.144886] Hardware name: Freescale i.MX7 Dual (Device Tree)
    [    0.144933] [<8001572c>] (unwind_backtrace) from [<8001279c>] (show_stack+0x10/0x14)
    [    0.144979] [<8001279c>] (show_stack) from [<8061a11c>] (dump_stack+0x84/0x98)
    [    0.145024] [<8061a11c>] (dump_stack) from [<8002c884>] (warn_slowpath_common+0x80/0xb0)
    [    0.145070] [<8002c884>] (warn_slowpath_common) from [<8002c950>] (warn_slowpath_null+0x1c/0x24)
    [    0.145113] [<8002c950>] (warn_slowpath_null) from [<8001c350>] (__arm_ioremap_pfn_caller+0xcc/0x1a8)
    [    0.145156] [<8001c350>] (__arm_ioremap_pfn_caller) from [<8001c478>] (__arm_ioremap_caller+0x4c/0x54)
    [    0.145200] [<8001c478>] (__arm_ioremap_caller) from [<80023fc0>] (imx_rpmsg_find_vqs+0x68/0x194)
    [    0.145246] [<80023fc0>] (imx_rpmsg_find_vqs) from [<804a5ed8>] (rpmsg_probe+0xbc/0x378)
    [    0.145291] [<804a5ed8>] (rpmsg_probe) from [<8032e790>] (virtio_dev_probe+0x208/0x2d8)
    [    0.145336] [<8032e790>] (virtio_dev_probe) from [<803603a4>] (driver_probe_device+0x174/0x2a8)
    [    0.145379] [<803603a4>] (driver_probe_device) from [<8035eaf4>] (bus_for_each_drv+0x60/0x94)
    [    0.145421] [<8035eaf4>] (bus_for_each_drv) from [<803601fc>] (device_attach+0x80/0x94)
    [    0.145463] [<803601fc>] (device_attach) from [<8035f8c4>] (bus_probe_device+0x84/0xa8)
    [    0.145507] [<8035f8c4>] (bus_probe_device) from [<8035dbf8>] (device_add+0x36c/0x568)
    [    0.145550] [<8035dbf8>] (device_add) from [<8032e3e4>] (register_virtio_device+0xa8/0xe8)
    [    0.145592] [<8032e3e4>] (register_virtio_device) from [<80023ecc>] (imx_rpmsg_probe+0x74/0x100)
    [    0.145636] [<80023ecc>] (imx_rpmsg_probe) from [<80361b18>] (platform_drv_probe+0x48/0xa4)
    [    0.145679] [<80361b18>] (platform_drv_probe) from [<803603a4>] (driver_probe_device+0x174/0x2a8)
    [    0.145722] [<803603a4>] (driver_probe_device) from [<803605a8>] (__driver_attach+0x8c/0x90)
    [    0.145763] [<803605a8>] (__driver_attach) from [<8035ea4c>] (bus_for_each_dev+0x68/0x9c)
    [    0.145804] [<8035ea4c>] (bus_for_each_dev) from [<8035fae0>] (bus_add_driver+0xf4/0x1e8)
    [    0.145845] [<8035fae0>] (bus_add_driver) from [<80360bd4>] (driver_register+0x78/0xf4)
    [    0.145887] [<80360bd4>] (driver_register) from [<8086b724>] (imx_rpmsg_init+0x14/0x40)
    [    0.145930] [<8086b724>] (imx_rpmsg_init) from [<80009678>] (do_one_initcall+0x8c/0x1d0)
    [    0.145974] [<80009678>] (do_one_initcall) from [<80863db8>] (kernel_init_freeable+0x144/0x1d4)
    [    0.146017] [<80863db8>] (kernel_init_freeable) from [<80618630>] (kernel_init+0x8/0xe8)
    [    0.146060] [<80618630>] (kernel_init) from [<8000f328>] (ret_from_fork+0x14/0x2c)
    [    0.146110] ---[ end trace 4455982a4ffd44b3 ]---
    [    0.146149] virtio_rpmsg_bus: probe of virtio0 failed with error -12
    [    0.146265] imx rpmsg driver is registered.

When memargs is empty, everything seems works fine. So the question is, can I use 1MB @ 0x8fe00000 for M4?

0x8fe00000 is after Linux System RAM 80000000-8fdfffff

Or should I reserve memory in device tree?

Best regards


Thank you very much for answers. I will use your hints.