Hello:

I have the following setup:
PPC405EX
Linux 2.6.30.3
Xenomai 2.4.10
I-pipe 2.7-02
ppc_4xx-gcc (GCC) 4.2.2
Configuration file is attached

I am writing an RTDM driver to allocate DMA memory and map it to
user space using functions:
pci_alloc_consistent()
rtdm_mmap_to_user()

Driver can access this memory but user space access causes Oops
and Kernel panic:
DataData machine check in kernel mode.
Oops: Machine check, sig: 7 [#1]
Flex-AM
Modules linked in: magnum dsp vreg vsync flx_alt_tse codec flx_alt_fpga
at24 pca
953x [last unloaded: at24]
NIP: c0008e24 LR: c0010920 CTR: c01d50d0
REGS: cfff9f50 TRAP: 0202   Not tainted  (2.6.30.3-00059-g8f94ee9)
MSR: 00021030 <ME,CE,IR,DR>  CR: 04000022  XER: 20000000
TASK = cf635ce0[1455] 'ancvbirt' THREAD: cf646000
GPR00: 00008030 cf647d60 cf635ce0 cf647d70 00000001 00000005 c01d2d30
000060da
GPR08: 00000034 c0010920 00021032 c0008e24 cf646248 10074cf0 0fff2500
0ffe871c
GPR16: 0ffb702c 0ffdf628 cf647e38 00008000 c032947c 10624dd3 00044b83
00000004
GPR24: c03e5098 cf647e4c c03b3350 00000007 cf647ec8 c03e5140 c03e513c
00000000
NIP [c0008e24] __ipipe_grab_irq+0x0/0xa4
LR [c0010920] __ipipe_ret_from_except+0x0/0xc
Call Trace:
[cf647e20] [c03e5140] 0xc03e5140
[cf647e30] [c0024d64] vprintk+0x2a0/0x344
[cf647ec0] [c0025310] printk+0x9c/0x1c0
[cf647f10] [c000cd8c] machine_check_4xx+0x28/0x84
[cf647f20] [c000d658] machine_check_exception+0x64/0x228
[cf647f40] [c0010624] ret_from_crit_exc+0x0/0x11c
Instruction dump:
4804c1ed 2f830200 7c651b78 409e0014 80010014 38210010 7c0803a6 4e800020
3c60c032 38636190 38800200 4801af99 <9421fff0> 7c0802a6 93e1000c
90010014
Kernel panic - not syncing: Fatal exception

I also tried rtdm_iomap_to_user() using the bus address returned by
pci_alloc_consistent() with same result. In addition, access to DMA
memory using 'mm' utility works. So it appears to be an issue with
rtdm_mmap_to_user()/rtdm_iomap_to_user().
 
Is this usage correct/allowed? or
should I use instead the memory heap services?

Thanks,
Luis Herrera-Bendezu

Attachment: flex-am_defconfig
Description: flex-am_defconfig

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to