Dear friends, about hardware platform s32g399a, I used kernel 5.10.158-rt77 from
s32cc_defconfig, but failed to run sample module and got kernel crash with 2 ways,
#1 Method build without poll
step 1 insmod ipc-shm-dev.ko
step 2 insmod ipc-shm-sample.ko ==> crash !
#2 Method build with poll
step 1 insmod ipc-shm-dev.ko
step 2 insmod ipc-shm-sample.ko ==> crash !
--------------------
root@s32g274ardb2:~/release0511/poll# insmod ../ipc-shm-dev.ko
root@s32[ 23.991908] ipc_shm_dev: loading out-of-tree module taints kernel.
g274ardb2:~/release0511/poll# ls
ipc-shm-sample.elf ipc-shm-sample.ko ipc-shm-sample_multi-instance.ko
root@s32g274ardb2:~/release0511/poll# lsmod
Module Size Used by
ipc_shm_dev 40960 0
root@s32g274ardb2:~/release0511/poll# ./ipc-shm-sample.elf
ipc-shm-us-lib: ipc_os_init(): Can't open /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/ipc-shm-uio.ko module
root@s32g274ardb2:~/release0511/poll# mkdir -p /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/
root@s32g274ardb2:~/release0511/poll# cp ../ipc-shm-uio.ko /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/
root@s32g274ardb2:~/release0511/poll# ./ipc-shm-sample.elf
[ 65.459695] ipc-shm-uio 40198000.mscm: GIC Rx IRQ = 24
[ 65.459959] ipc-shm-uio 40198000.mscm: device ready
[ 65.460850] SError Interrupt on CPU7, code 0xbf000002 -- SError
[ 65.460861] CPU: 7 PID: 415 Comm: ipc-shm-sample. Tainted: G O 5.10.158-rt77 #13
[ 65.460867] Hardware name: NXP S32G399A-RDB3 (DT)
[ 65.460872] pstate: 60000000 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[ 65.460878] pc : 000000000040299c
[ 65.460880] lr : 0000000000402900
[ 65.460882] sp : 0000007feb637380
[ 65.460884] x29: 0000007feb637380 x28: 0000000000000000
[ 65.460894] x27: 0000000000000000 x26: 0000000000000000
[ 65.460901] x25: 0000000000000000 x24: 0000000000000000
[ 65.460906] x23: 0000000000000000 x22: 0000000000000000
[ 65.460912] x21: 0000000000401210 x20: 0000000000000000
[ 65.460917] x19: 0000000000404810 x18: 0000000000000000
[ 65.460924] x17: 0000007fb2fc9f40 x16: 0000007fb30a9f18
[ 65.460930] x15: 0000000000000000 x14: 0000000000000120
[ 65.460936] x13: 0000007fb3066108 x12: 0000007fb2cf8150
[ 65.460942] x11: 00000000003d0f00 x10: 0000007fb3086e24
[ 65.460948] x9 : 0000000001798470 x8 : 0000000000000087
[ 65.460953] x7 : 0000000000000000 x6 : 0000007fb2cf8220
[ 65.460959] x5 : 0000007fb2cf88e0 x4 : 00000000004161c8
[ 65.460964] x3 : 0000007fb2cf9008 x2 : 0000000000000000
[ 65.460971] x1 : 0000000000000000 x0 : 0000000000000048
[ 65.460978] Kernel panic - not syncing:
[ 65.460980] Asynchronous SError Interrupt
[ 66.461104] SMP: stopping secondary CPUs
[ 66.596970] Kernel Offset: disabled
[ 66.600436] CPU features: 0x00040022,2000200c
[ 66.604777] Memory Limit: none
[ 66.607819] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---
解決済! 解決策の投稿を見る。
Hi,
How are you setting your "project_parameters.mk" file? You are seeing that the specific file is not included under the include path.
Also, are you setting the flag to let EBT copy the project into its workspace?
If so, the generated files are not located at the IPCF example folder, but at the EB tresos folder. You can copy the generated files into the example folder (from EB/tresos/generate to Ipcf_TS_T40D11M40I0R0/examples/EBT/S32G3/Ipcf_Example_S32G399A_M7/generate), since the makefile of the project is configured to search in here, where the file that you are looking is located.
If you do not set the copy flag (as shown above), then your generate/include folder should look as follows:
Which, again, has the file that you are looking for.
Please, let us know.
Hi,
You say you are using S32G3 platform, but under the log you have provided it seems that you are using S32G2 software. Was this a typo?
Also, which BSP are you using?
Aside from this situation, it seems that you may be experiencing the same behavior as the following community thread:
IPCF kernel panic - NXP Community
Have you tried both turning off dcache as well as zeroing the SRAM region?
Please, let us know.
Thanks.
Here is my ipc-shm & ipc-shm-us software dev branch SW32G_IPCF_4.8.0_D2212, do you think it is not correct sw stack for s32g3 ?
Hi,
Thanks for your feedback.
The IPCF version depends on the BSP version that you are using, which BSP version are you using?
Also, the dcache is not the only option that needs to be fulfilled, also the zeroing of the related SRAM region. The following is shown under the "description.txt" of the IPCF examples:
"- Disable Data Cache from uboot::
dcache off
- Zero-set SRAM shared memory used by both sample apps::
mw.q 0x34000000 0x0 0x100000"
Please, let us know.
Hi,
Thanks for your feedback.
Which BSP are you using?
The only situation in which we can reproduce your scenario is when there is no other core running the IPCF application, image below:
Once we set an application on another core, we see the following result:
Please, let us know.
Hi,
Thanks for your feedback.
Doing more research upon your current setup (IPCF 4.8.0), there seems to be a bug under the provided M7 example. Help us trying the single instance example (IPCF_Example_S32G399_M7) following these steps:
1. Modify the ipc_sample_configure_irq()
void ipc_sample_configure_irq(int irq_prio)
{
if (ipcf_shm_instances_cfg.shm_cfg[IPCF_INSTANCE].inter_core_rx_irq
!= IPC_IRQ_NONE) {
IntCtrl_Ip_InstallHandler(
ipcf_shm_instances_cfg.shm_cfg[IPCF_INSTANCE].inter_core_rx_irq
, ipc_shm_hardirq, NULL_PTR);
IntCtrl_Ip_SetPriority(
ipcf_shm_instances_cfg.shm_cfg[IPCF_INSTANCE].inter_core_rx_irq
, irq_prio);
IntCtrl_Ip_EnableIrq(
ipcf_shm_instances_cfg.shm_cfg[IPCF_INSTANCE].inter_core_rx_irq
);
}
}
2. Modify the configuration of local and remote shared mem address:
local shared mem address: 0x34200000
remote shared mem address: 0x34100000
These 2 steps are related to the M7 application. We have used the NXP provided BSP 35.0 and we can run the application as follows:
Please, let us know.
Hi,
Thanks for your feedback.
We are seeing that you are executing the following command on u-boot:
cp.q 0x80000000 0x34200000 0x60000
Which is not the one mentioned over the "description.txt" provided under the single instance example, which referred to under the patch we have shared.
The single instance example also provides the commands that you need to follow in order to verify the example, which we don't see you are following.
Help us verifying that you can run the single instance with the provided patch and following the steps provided under the "description.txt" file embedded in the example (we understand that you are tftping your image, which should not be a problem).
Please, let us know.
Hi,
We are not seeing any output regarding the IPCF 4.8.0 single instance example for S32DS we have mentioned earlier.
Can you help us with that? Since you were mentioning you were working with it.
Please, let us know.
Hi,
For your specific command, we are not seeing it mentioned over the "description.txt" file that it is provided under the IPCF 4.8.0 eclipse plugin.
Have you followed the file? Does it fail?
Please, let us know.
Yes, I followed up ops in description.txt, and can be successful by clicking update code. That's why I show you errors by making build. Thanks.
Hi,
When you are saying "can be successful by clicking update code", are you referring to S32DS??
For EBT project, another "description.txt" is provided, which provides the related information for building the EBT project as well as "project_paramteres.mk" and the "make" command.
Please, let us know.