RPMSG on Verdin IMX8MP

Carrier Board : Verdin Dev Board
Board : IMX8MP
Linux : verdin-imx8mp-15290475 5.15.129-rt67-6.5.0-devel+git.6f8fd49366db #1 SMP PREEMPT_RT Fri Dec 22 11:15:52 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Focus : rpmsg

I am using following device overlay

I created file following dts and then created the DTBO.

verdin-imx8mp_hmp_overlay_RR.dts (1.3 KB)

When I enabled this overlay, Linux is not booting up properly and the following error has happened.

Guide me on the device tree.

Bootlog:

[ 1.012537] hub 2-0:1.0: 1 port detected
[ 1.013208] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 7 mkt segment 2 supported-hw 0x80 0x4
[ 1.016355] remoteproc remoteproc0: imx-rproc is available
[ 1.016374] sdhci-esdhc-imx 30b50000.mmc: Got CD GPIO
[ 1.016427] remoteproc remoteproc0: attaching to imx-rproc
[ 1.016450] Unable to handle kernel paging request at virtual address ffff800009c14fff
[ 1.016454] Mem abort info:
[ 1.016455] ESR = 0x0000000096000007
[ 1.016458] EC = 0x25: DABT (current EL), IL = 32 bits
[ 1.016461] SET = 0, FnV = 0
[ 1.016463] EA = 0, S1PTW = 0
[ 1.016465] FSC = 0x07: level 3 translation fault
[ 1.016468] Data abort info:
[ 1.016469] ISV = 0, ISS = 0x00000007
[ 1.016471] CM = 0, WnR = 0
[
1.016473] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000049740000
[ 1.016478] [ffff800009c14fff] pgd=100000013ffff003, p4d=100000013ffff003, pud=100000013fffe003, pmd=10000001001c2003, pte=0000000000000000
[ 1.016490] Internal error: Oops: 96000007 [#1] PREEMPT_RT SMP
[ 1.016494] Modules linked in:
[ 1.016498] CPU: 3 PID: 8 Comm: kworker/u8:0 Not tainted 5.15.129-rt67-6.5.0-devel+git.6f8fd49366db #1
[ 1.016504] Hardware name: Toradex Verdin iMX8M Plus on Verdin Development Board (DT)
[ 1.016508] Workqueue: events_unbound deferred_probe_work_func
[ 1.016520] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 1.016525] pc : rproc_handle_resources.constprop.0+0x94/0x168
[ 1.016533] lr : rproc_boot+0x45c/0x614
[ 1.016539] sp : ffff800009a8ba10
[ 1.016541] x29: ffff800009a8ba10 x28: ffff0000ff7a4120 x27: ffff8000094406c0
[ 1.016548] x26: ffffffffffffffff x25: ffff800009c15000 x24: ffff80000943fe38
[ 1.016554] x23: ffff0000c10e0038 x22: 0000000000000000 x21: ffff800009929618
[ 1.016561] x20: ffff0000c10e0000 x19: 0000000000000000 x18: 0000000000000038
[ 1.016567] x17: 000000000000001c x16: 00000000110169ff x15: 6c6261745f63441f
[ 1.016573] x14: 0000000000000001 x13: 0000000000000000 x12: 0000000000000003
[ 1.016582] x11: 0101010101010101 x10: 0000000000000037 x9 : 0000000000000000
[ 1.016588] x8 : ffff0000c065af80 x7 : 0000000000000000 x6 : 000000000000003f
[ 1.016594] x5 : 0000000000000040 x4 : ffff0000c10e0400 x3 : 00000000000003fd
[ 1.016600] x2 : 00000000ffffffff x1 : ffff800009c15003 x0 : ffff800009c15000
[ 1.016607] Call trace:
[ 1.016610] rproc_handle_resources.constprop.0+0x94/0x168
[ 1.016616] rproc_boot+0x45c/0x614
[ 1.016620] rproc_add+0xd0/0x180
[ 1.016625] imx_rproc_probe+0x550/0x680
[ 1.016630] platform_probe+0x68/0xe0
[ 1.016634] really_probe.part.0+0x9c/0x30c
[ 1.016640] __driver_probe_device+0x98/0x170
[ 1.016645] driver_probe_device+0xe0/0x170
[ 1.016650] __device_attach_driver+0xb8/0x140
[ 1.016656] bus_for_each_drv+0x7c/0xdc
[ 1.016661] __device_attach+0xac/0x1d0
[ 1.016670] device_initial_probe+0x14/0x20
[ 1.016681] bus_probe_device+0x9c/0xa4
[ 1.016688] deferred_probe_work_func+0x80/0xc0
[ 1.016698] process_one_work+0x1d0/0x374
[ 1.016703] worker_thread+0x2b0/0x480
[ 1.016708] kthread+0x188/0x1a0
[ 1.016716] ret_from_fork+0x10/0x20
[ 1.016723] Code: 128002b3 91380021 97ffc52d 1400002e (b87a6b20)
[ 1.016728] —[ end trace 0000000000000002 ]—
[ 1.051422] mmc1: SDHCI controller on 30b50000.mmc [30b50000.mmc] using ADMA
[ 1.229834] imx6q-pcie 33800000.pcie: iATU unroll: enabled
[ 1.229843] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[ 1.229856] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[ 1.229905] imx6q-pcie 33800000.pcie: IO 0x001ff80000..0x001ff8ffff → 0x0000000000
[ 1.229923] imx6q-pcie 33800000.pcie: MEM 0x0018000000..0x001fefffff → 0x0018000000
[ 1.230111] imx6q-pcie 33800000.pcie: iATU unroll: enabled
[ 1.230116] imx6q-pcie 33800000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[ 1.269467] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 1.491043] hub 1-1:1.0: USB hub found
[ 1.491088] hub 1-1:1.0: 4 ports detected
[ 1.557494] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 1.602706] hub 2-1:1.0: USB hub found
[ 1.602747] hub 2-1:1.0: 3 ports detected
[ 1.849811] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[ 2.232748] imx6q-pcie 33800000.pcie: Phy link never came up
[ 2.232784] +V3.3_SW: Underflow of regulator enable count
[ 2.232799] imx6q-pcie: probe of 33800000.pcie failed with error -110

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Device Tree Overlay Issue Analysis

The kernel panic you’re experiencing is related to memory mapping issues in the RemoteProc framework when trying to handle resources. The error occurs during rproc_handle_resources at a memory access violation.

Root Cause

The issue appears to be in your custom device tree overlay memory configuration (1). Toradex provides pre-tested device tree overlays for HMP on Verdin iMX8M Plus, and the memory addresses must be precisely configured (2).

Solution Steps

  1. Use the Verified Overlay: Start with the official verdin-imx8mp_hmp_overlay.dts which is available and tested (1).

  2. Check Memory Buffer Reservations: The memory addresses for RPMsg communication must match between your device tree overlay and the Cortex-M firmware (2). The buffer reservation works with specific memory addresses:

/* Shared memory base for RPMsg communication. */
#define VDEV0_VRING_BASE      (0xB8000000U)
#define RESOURCE_TABLE_OFFSET (0xFF000)

(2)

  1. Verify Memory Mapping: Ensure your custom overlay uses the correct memory addresses. The memory areas must be properly configured as shown in the working examples (2):
vdev0vring0: vdev0vring0@b8000000 {

(2)

Recommended Approach

  1. Start with the Official Overlay: Use the pre-compiled verdin-imx8mp_hmp_overlay.dtbo that comes with Torizon OS (1).

  2. Test Basic Functionality: Verify RPMsg communication works with the standard overlay before making modifications (3).

  3. Gradual Customization: If you need custom modifications, make incremental changes to the working overlay rather than creating from scratch (4).

Memory Configuration Requirements

For Verdin iMX8M Plus, the memory areas must be carefully configured to avoid conflicts between the Cortex-A53 and Cortex-M7 cores (5). The shared memory region and resource table must be properly aligned and accessible to both cores (2).

The kernel panic suggests your custom overlay may have incorrect memory mappings that cause the RemoteProc framework to access invalid memory addresses during resource handling.

Best regards, Toradex AI Assistant.

Hi Thanks for your guidance,

  1. first I have tried to run the default verdin-imx8mm_hmp_overlay.dtbo

verdin-imx8mp_hmp_overlay_ori.dtbo (2.6 KB)

It has same error issue as the Linux was not booting up properly.

I felt that compaitable is mismatching ,

original was compatible = “toradex,verdin-imx8mp”; mentioned in the dtbo→dts.

Then I edited the following compatible to

t compatible = “toradex,verdin-imx8mp-wifi-dahlia”,“toradex,verdin-imx8mp-wifi”,“toradex,verdin-imx8mp”,“toradex,verdin-imx8mp-nonwifi-dev”,“fsl,imx8mp”;

i assume the compaitble board was nonwifi_dev board.

But then again, i was facing the same issue.

One more issues;

#include <dt-bindings/clock/imx8mm-clock.h> I did not have kernel source , is there any way I can have the torizon kernel source to refer.

Thanks

Ramesh.

Hi ,

I edited the file with the compatible,

verdin-imx8mp_hmp_overlay.dts (2.6 KB)

with the ping-pong demo code, i managed to run the code.

I refered to this Link as well : Blinking led application and kernel panic - #10 by bruno.tx

Thanks
Ramesh.