Hello everyone,
i have some problems with kernel modules in the petalinux dist.
If i compile my code directly into the kernel everything works fine and kernel is happy. However if i compile my code
as a kernel module everything goes bad.
I get Oops all the time, posting an example below, usually i get signal 4 and signal 11. The fops comes when i echo data into the device file, loading and unloading works fine. After the error i am thrown out to the login prompt so I guess the Init process restarts. The code i use is really simple with 2 fops(read,release) basically they just printk at the moment.
I do not have the knowledge on how to resolve this issue and i really do not know where to start looking either. But since it works fine when compiled into the kernel I guess its somewhere in the module support the problem is.
echo 1 > /dev/chrd outputs:
device_open(cfd9fb40) <-- just a printk
Oops: Exception in kernel mode, sig: 4
Registers dump: mode=1
r1=CFD9FB50, r2=00000000, r3=00000000, r4=00000000
r5=D00143A4, r6=CFD9FB40, r7=00000001, r8=CFD9FB40
r9=C05F3864, r10=00000000, r11=000041AA, r12=C004F018
r13=00000000, r14=1003C540, r15=CFD9FB40, r16=C00062D8
r17=D0014070, r18=00000002, r19=1003A3CC, r20=00000400
r21=CFD9FB40, r22=C01D08D8, r23=C05E5370, r24=C0052AD0
r25=CFE862D8, r26=BFB6CC40, r27=00005410, r28=00000000
r29=00000002, r30=00000000, r31=C061D03C, rPC=CFD9FB50
ear=CFD9FB40, esr=C004EFD8
Best regards
Nils