ipc shm sample driver loading failure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ipc shm sample driver loading failure

569 Views
Niranj_369
Contributor I

Hi @Joey_z 

We are using s32g3 rdb2 evaluation. the goal is to establish IPCF communication between the M7 and A53 cores.
The M7 firmware is loaded by stopping the A53 U-boot, loading the firmware in sram and start the firmware. The boot the a53 core.  Upto this steps are done.

After that, I tried loading the IPCF drivers on the A53 side by following the steps from the S32DS M7 IPCF example documentation.

Niranj_369_0-1761133294436.png

 

 

The ipc-shm-dev.ko module loads successfully, though it logs the expected warning:

[ 42.983443] ipc_shm_dev: loading out-of-tree module taints kernel.

However, when I try to load ipc-shm-sample.ko, it fails with a synchronous external abort.

sc1.png

For reference, I built the drivers from the SW32G_IPCF_4.10.0_D2405 branch against our current kernel version (6.6), and the M7 core is running IPCF firmware version 4.10.0.

Could you please help me identify what might be causing the crash or suggest a fix?

0 Kudos
Reply
4 Replies

548 Views
Niranj_369
Contributor I


I'm building the IPCF drivers separately(using source from nxp's repo) against the kernel source corresponding to the Yocto bsp 43.0(the one we are using). Although the ipc-shm recipe is available in NXP's nxp_auto_linux repository, attempting to build it through Yocto(bitbake command) results in a series of errors, one after another. Due to these issues, I've opted to compile the modules manually outside the Yocto build system.

0 Kudos
Reply

529 Views
Joey_z
NXP Employee
NXP Employee

hi,Niranj_369

Thank you for your information.

1.I'm building the IPCF drivers separately(using source from nxp's repo) against the kernel source corresponding to the Yocto bsp 43.0(the one we are using).

>>> Do you have changed the kernal Image/dtb to BSP43? Make sure has the same kernel version for IPCF. You can try to test it.

BR

Joey

0 Kudos
Reply

496 Views
Niranj_369
Contributor I

Hi @Joey_z 
We built the drivers from the Yocto source, but the issue still persists.
Next, we rebuilt BSP 40 along with the driver and attempted to load it. However, we encountered the following error: 

sc3.png

Q1: Does the M7 firmware need to be loaded before the driver can be successfully loaded?
Q2: Which of the following drivers should be loaded, considering we're using the IPCF_baremetal firmware (not the multi-instance variant)?
sc4.png
Q3: What is the root cause of the error we’re seeing, and how can we resolve it?

0 Kudos
Reply

480 Views
Joey_z
NXP Employee
NXP Employee

hi,Niranj_369

Thank you for your reply.

Q1: Does the M7 firmware need to be loaded before the driver can be successfully loaded?

>>>Yes, you need to load M7 firmware before load the IPCF driver in kernel.
Q2: Which of the following drivers should be loaded, considering we're using the IPCF_baremetal firmware (not the multi-instance variant)?

>>>The IPCF driver should match the M7 IPCF application, you can choice the M7 application of sample and multi_instance.

Joey_z_1-1761271230822.png

Q3: What is the root cause of the error we’re seeing, and how can we resolve it?

>>>You should make sure you have the correct M7 application using.  Also, you should have the correct sequence for loading driver of IPCF in kernel. Like the sample driver, you should add the ipc-shm-dev.ko and ipc-shm-sample.ko.

Joey_z_2-1761271642661.png

Hope this can help you.

BR

Joey

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2190759%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eipc%20shm%20sample%20driver%20loading%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190759%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F236188%22%20target%3D%22_blank%22%3E%40Joey_z%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EWe%20are%20using%20s32g3%20rdb2%20evaluation.%20the%20goal%20is%20to%20establish%20IPCF%20communication%20between%20the%20M7%20and%20A53%20cores.%3CBR%20%2F%3EThe%20M7%20firmware%20is%20loaded%20by%20stopping%20the%20A53%20U-boot%2C%20loading%20the%20firmware%20in%20sram%20and%20start%20the%20firmware.%20The%20boot%20the%20a53%20core.%26nbsp%3B%20Upto%20this%20steps%20are%20done.%3C%2FP%3E%3CP%3EAfter%20that%2C%20I%20tried%20loading%20the%20IPCF%20drivers%20on%20the%20A53%20side%20by%20following%20the%20steps%20from%20the%20S32DS%20M7%20IPCF%20example%20documentation.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Niranj_369_0-1761133294436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Niranj_369_0-1761133294436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362112iC4611172A2755BFD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Niranj_369_0-1761133294436.png%22%20alt%3D%22Niranj_369_0-1761133294436.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3EThe%20ipc-shm-dev.ko%20module%20loads%20successfully%2C%20though%20it%20logs%20the%20expected%20warning%3A%3C%2FP%3E%3CP%3E%5B%2042.983443%5D%20ipc_shm_dev%3A%20loading%20out-of-tree%20module%20taints%20kernel.%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20try%20to%20load%20ipc-shm-sample.ko%2C%20it%20fails%20with%20a%20synchronous%20external%20abort.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sc1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22sc1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362118i8B232E19339A2C5E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sc1.png%22%20alt%3D%22sc1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EFor%20reference%2C%20I%20built%20the%20drivers%20from%20the%20SW32G_IPCF_4.10.0_D2405%20branch%20against%20our%20current%20kernel%20version%20(6.6)%2C%20and%20the%20M7%20core%20is%20running%20IPCF%20firmware%20version%204.10.0.%3CBR%20%2F%3E%3CBR%20%2F%3ECould%20you%20please%20help%20me%20identify%20what%20might%20be%20causing%20the%20crash%20or%20suggest%20a%20fix%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2192153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20ipc%20shm%20sample%20driver%20loading%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2192153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%2C%3CSPAN%3ENiranj_369%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20reply.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EQ1%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3BDoes%20the%20M7%20firmware%20need%20to%20be%20loaded%20before%20the%20driver%20can%20be%20successfully%20loaded%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26gt%3B%26gt%3B%26gt%3BYes%2C%20you%20need%20to%3CSPAN%3E%26nbsp%3Bload%20M7%20firmware%20before%20load%20the%20IPCF%20driver%20in%20kernel.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3EQ2%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3BWhich%20of%20the%20following%20drivers%20should%20be%20loaded%2C%20considering%20we're%20using%20the%20IPCF_baremetal%20firmware%20(not%20the%20multi-instance%20variant)%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26gt%3B%26gt%3B%26gt%3BThe%20IPCF%20driver%20should%20match%20the%20M7%20IPCF%20application%2C%20you%20can%20choice%20the%20M7%20application%20of%20sample%20and%20multi_instance.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Joey_z_1-1761271230822.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Joey_z_1-1761271230822.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362412iA706A79359E81049%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Joey_z_1-1761271230822.png%22%20alt%3D%22Joey_z_1-1761271230822.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EQ3%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3BWhat%20is%20the%20root%20cause%20of%20the%20error%20we%E2%80%99re%20seeing%2C%20and%20how%20can%20we%20resolve%20it%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3BYou%20should%20make%20sure%20you%20have%20the%20correct%20M7%20application%20using.%26nbsp%3B%20Also%2C%20you%20should%20have%20the%20correct%20sequence%20for%20loading%20driver%20of%20IPCF%20in%20kernel.%20Like%20the%20sample%20driver%2C%20you%20should%20add%20the%20ipc-shm-dev.ko%20and%20ipc-shm-sample.ko.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Joey_z_2-1761271642661.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Joey_z_2-1761271642661.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362415i65D534BA49F273A0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Joey_z_2-1761271642661.png%22%20alt%3D%22Joey_z_2-1761271642661.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHope%20this%20can%20help%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2191703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20ipc%20shm%20sample%20driver%20loading%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2191703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3C!--%20StartFragment%20%20--%3E%3C%2FP%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F236188%22%20target%3D%22_blank%22%3E%40Joey_z%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EWe%20built%20the%20drivers%20from%20the%20Yocto%20source%2C%20but%20the%20issue%20still%20persists.%3CBR%20%2F%3ENext%2C%20we%20rebuilt%20BSP%2040%20along%20with%20the%20driver%20and%20attempted%20to%20load%20it.%20However%2C%20we%20encountered%20the%20following%20error%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sc3.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22sc3.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362369iF3E77C69D79EDDD9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22sc3.png%22%20alt%3D%22sc3.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EQ1%3A%3C%2FSTRONG%3E%20Does%20the%20M7%20firmware%20need%20to%20be%20loaded%20before%20the%20driver%20can%20be%20successfully%20loaded%3F%3CBR%20%2F%3E%3CSTRONG%3EQ2%3A%3C%2FSTRONG%3E%20Which%20of%20the%20following%20drivers%20should%20be%20loaded%2C%20considering%20we're%20using%20the%20IPCF_baremetal%20firmware%20(not%20the%20multi-instance%20variant)%3F%3CBR%20%2F%3E%E2%80%83%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sc4.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22sc4.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F362370i68D6B40047AB2EFF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sc4.png%22%20alt%3D%22sc4.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3EQ3%3A%3C%2FSTRONG%3E%20What%20is%20the%20root%20cause%20of%20the%20error%20we%E2%80%99re%20seeing%2C%20and%20how%20can%20we%20resolve%20it%3F%3C%2FP%3E%3CP%3E%3C!--%20EndFragment%20%20--%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2191069%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20ipc%20shm%20sample%20driver%20loading%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2191069%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%2C%3CSPAN%3ENiranj_369%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20information.%3C%2FP%3E%0A%3CP%3E1.I'm%20building%20the%20IPCF%20drivers%20separately(using%20source%20from%20nxp's%20repo)%20against%20the%20kernel%20source%20corresponding%20to%20the%20Yocto%20bsp%2043.0(the%20one%20we%20are%20using).%3C%2FP%3E%0A%3CP%3E%26gt%3B%26gt%3B%26gt%3B%20Do%20you%20have%20changed%20the%20kernal%20Image%2Fdtb%20to%20BSP43%3F%20Make%20sure%20has%20the%20same%20kernel%20version%20for%20IPCF.%20You%20can%20try%20to%20test%20it.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2190818%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20ipc%20shm%20sample%20driver%20loading%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190818%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3C!--%20%20StartFragment%20%20%20--%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI'm%20building%20the%20IPCF%20drivers%20separately(using%20source%20from%20nxp's%20repo)%20against%20the%20kernel%20source%20corresponding%20to%20the%20Yocto%20bsp%2043.0(the%20one%20we%20are%20using).%20Although%20the%20ipc-shm%20recipe%20is%20available%20in%20NXP's%20nxp_auto_linux%20repository%2C%20attempting%20to%20build%20it%20through%20Yocto(bitbake%20command)%20results%20in%20a%20series%20of%20errors%2C%20one%20after%20another.%20Due%20to%20these%20issues%2C%20I've%20opted%20to%20compile%20the%20modules%20manually%20outside%20the%20Yocto%20build%20system.%3C%2FP%3E%3CP%3E%3C!--%20%20EndFragment%20%20%20--%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E