TI中文支持网
TI专业的中文技术问题搜集分享网站

基于BealgeBone Black 的PRU-ICSS测试问题

测试硬件:Bealgebone black 开发板

测试软件:ti-processor-sdk-linux-rt-am335x-evm-03.01.00.06-Linux-x86-Install

测试目的:测试Bealgebone black  PRU使用

测试场景1:加载modprobe uio_pruss

                   加载modprobe uio_pruss无报错,但是Verify driver is installed by checking if the following is visible in the file system:

                    但是cat  /sys/class/uio/uio0/maps/map0/addr 文件并未存在???,这是什么情况??

测试场景2:TI官网文档PRU Training: Hands-on Labs

样例        :LAB 5: RPMsg Communication between ARM and PRU

1)  Part 1: Kernel space communication

          执行insmod rpmsg_client_sample.ko后,并未出现“pmsg_client_sample driver print 100 messages to the console and then exit”现象,请问是什么原因?

          由于rpmsg_client_sample.ko 依赖于模块virtio_rpmsg_bus模块

           执行加载 $modprobe virtio_rpmsg_bus时,提示        

  remoteproc1: powering up 4a338000.pru1

[   94.591570]  remoteproc1: Booting fw image am335x-pru1-fw, size 74204

[   94.605949] ti-pruss 4a300000.pruss: configured system_events = 0x00000000000c0000 intr_channels = 0x0000000a host_intr = 0x0000000a

[   94.618161]  remoteproc1: remote processor 4a338000.pru1 is now up

[   94.624617] Unable to handle kernel NULL pointer dereference at virtual address 00000020

[   94.632771] pgd = dde08000

[   94.635487] [00000020] *pgd=9ddb2831, *pte=00000000, *ppte=00000000

[   94.641805] Internal error: Oops: 817 [#1] PREEMPT ARM

[   94.641821] Modules linked in: virtio_rpmsg_bus(+) pru_rproc pruss_intc pruss remoteproc virtio virtio_ring

[   94.641833] CPU: 0 PID: 99 Comm: modprobe Tainted: G        W  O    4.4.19-rt25 #6

[   94.641835] Hardware name: Generic AM33XX (Flattened Device Tree)

[   94.641839] task: dde10680 ti: ddd76000 task.ti: ddd76000

[   94.641864] PC is at pruss_intc_trigger+0x48/0x60 [pruss_intc]

[   94.641867] LR is at 0xdd0003c0

[   94.641872] pc : [<bf021140>]    lr : [<dd0003c0>]    psr: 60080013

[   94.641872] sp : ddd77bd0  ip : dd0004b8  fp : ddd77bdc

[   94.641875] r10: de845e00  r9 : 00000200  r8 : 024000c0

[   94.641879] r7 : ddde8010  r6 : 00000010  r5 : dddee0c0  r4 : ddca7820

[   94.641882] r3 : 00000013  r2 : 00000000  r1 : 000000be  r0 : 00000000

[   94.641888] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none

[   94.641892] Control: 10c5387d  Table: 9de08019  DAC: 00000051

[   94.641895] Process modprobe (pid: 99, stack limit = 0xddd76208)

[   94.641899] Stack: (0xddd77bd0 to 0xddd78000)

[   94.641907] 7bc0:                                     ddd77bf4 ddd77be0 bf0275e0 bf021104

[   94.641916] 7be0: dddee180 dddee0c0 ddd77c04 ddd77bf8 bf00f6a4 bf02759c ddd77c1c ddd77c08

[   94.641924] 7c00: bf000110 bf00f688 00000001 dddee0c0 ddd77c84 ddd77c20 bf03342c bf0000f8

[   94.641932] 7c20: 00000035 ddd9b6e0 ddd77c6c de844000 bf033ba0 00004000 bf032ee0 bf032eb4

[   94.641940] 7c40: dddee180 dddee6c0 00000002 00000000 00000200 9e845e00 ddd938c0 ddde81e0

[   94.641948] 7c60: 00000000 ddde8010 ddde8030 00000001 00000000 00000000 ddd77ce4 ddd77c88

[   94.641957] 7c80: bf0073b0 bf033164 c0165398 c0161c1c ddde8030 00000000 ddde8038 00000000

[   94.641965] 7ca0: ddde8010 0000000c ddde81e0 00000000 ddde8030 bf033cf8 ddd77ce4 ddde8030

[   94.641973] 7cc0: c093f754 c093f764 00000000 bf033cf8 0000000c 00000000 ddd77d0c ddd77ce8

[   94.641981] 7ce0: c03c7b8c bf007180 ddde8030 bf033cf8 ddde8064 00000000 ddd27648 222d89dc

[   94.641989] 7d00: ddd77d2c ddd77d10 c03c7d1c c03c7994 00000000 bf033cf8 c03c7c88 00000000

[   94.641998] 7d20: ddd77d54 ddd77d30 c03c5dfc c03c7c94 ddd95464 dddef244 ddd95488 bf033cf8

[   94.642006] 7d40: dddef000 bf007b64 ddd77d64 ddd77d58 c03c747c c03c5d98 ddd77d8c ddd77d68

[   94.642014] 7d60: c03c70c4 c03c7464 bf033c60 ddd77d78 bf033cf8 bf037000 c08babe0 ddd27800

[   94.642023] 7d80: ddd77da4 ddd77d90 c03c823c c03c6f28 00000000 bf037000 ddd77db4 ddd77da8

[   94.642031] 7da0: bf0078c4 c03c81c8 ddd77dcc ddd77db8 bf037044 bf0078a0 c08babe0 bf037000

[   94.642039] 7dc0: ddd77e4c ddd77dd0 c00096d4 bf03700c 0040003e bf033e00 ddd77e2c ddd77de8

[   94.642048] 7de0: c00b8a04 c06306c4 00000000 de7a00f8 ddd76000 dddceb00 c00e6164 dd801e40

[   94.642056] 7e00: 00005090 bf033e00 ddd77e44 ddd77e18 c00f0818 c00efc4c 00000001 c00e6164

[   94.642064] 7e20: c092e7bc bf033e00 00000001 ddd27700 00000001 ddd27648 222d89dc bf033e00

[   94.642073] 7e40: ddd77e74 ddd77e50 c00b0b84 c0009648 ddd27640 00000001 ddd77e74 ddd77f44

[   94.642081] 7e60: 00000001 ddd27640 ddd77f3c ddd77e78 c0092044 c00b0b28 bf033e0c 00007fff

[   94.642089] 7e80: bf033e00 c008f4f8 dddee600 c07b9ba8 c07b9b80 c07b9bd8 c07b9b74 c0634e80

[   94.642097] 7ea0: 00000000 bf033e0c bf033f90 e0946bbc 00000000 bf033f18 c008eda8 bf033e48

[   94.642106] 7ec0: bf033766 00000001 00036692 00000000 0b300002 bf033668 00000008 00000000

[   94.642113] 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[   94.642121] 7f00: 00000000 00000000 00000000 00000000 00000030 00000000 00000004 000acb8b

[   94.642129] 7f20: 0000017b c000fb84 ddd76000 00000000 ddd77fa4 ddd77f40 c0092484 c0090314

[   94.642138] 7f40: ddd77f94 e0941000 00005c0c e094675c e0943f8b e0945044 00001fc8 00002968

[   94.642145] 7f60: 00000000 00000000 00000000 00001c6c 0000001c 0000001d 00000015 00000011

[   94.642154] 7f80: 0000000e 00000000 ddd77fa4 7fffffff ffffffff 00000000 00000000 ddd77fa8

[   94.642162] 7fa0: c000f9c0 c0092408 7fffffff ffffffff 00000004 000acb8b 00000000 000da0f0

[   94.642170] 7fc0: 7fffffff ffffffff 00000000 0000017b 000bf758 000f6148 b6faa6e0 000bee04

[   94.642178] 7fe0: be946ab8 be946aa8 00027925 b6eb3df2 80080030 00000004 00000000 00000000

[   94.642181] Backtrace:

[   94.642210] [<bf0210f8>] (pruss_intc_trigger [pruss_intc]) from [<bf0275e0>] (pru_rproc_kick+0x50/0x6c [pru_rproc])

[   94.642262] [<bf027590>] (pru_rproc_kick [pru_rproc]) from [<bf00f6a4>] (rproc_virtio_notify+0x28/0x30 [remoteproc])

[   94.642268]  r5:dddee0c0 r4:dddee180

[   94.642311] [<bf00f67c>] (rproc_virtio_notify [remoteproc]) from [<bf000110>] (virtqueue_notify+0x24/0x3c [virtio_ring])

[   94.642356] [<bf0000ec>] (virtqueue_notify [virtio_ring]) from [<bf03342c>] (rpmsg_probe+0x2d4/0x444 [virtio_rpmsg_bus])

[   94.642361]  r5:dddee0c0 r4:00000001

[   94.642389] [<bf033158>] (rpmsg_probe [virtio_rpmsg_bus]) from [<bf0073b0>] (virtio_dev_probe+0x23c/0x3bc [virtio])

[   94.642399]  r10:00000000 r9:00000000 r8:00000001 r7:ddde8030 r6:ddde8010 r5:00000000

[   94.642402]  r4:ddde81e0

[   94.642429] [<bf007174>] (virtio_dev_probe [virtio]) from [<c03c7b8c>] (driver_probe_device+0x204/0x300)

[   94.642438]  r10:00000000 r9:0000000c r8:bf033cf8 r7:00000000 r6:c093f764 r5:c093f754

[   94.642441]  r4:ddde8030

[   94.642451] [<c03c7988>] (driver_probe_device) from [<c03c7d1c>] (__driver_attach+0x94/0x98)

[   94.642460]  r9:222d89dc r8:ddd27648 r7:00000000 r6:ddde8064 r5:bf033cf8 r4:ddde8030

[   94.642470] [<c03c7c88>] (__driver_attach) from [<c03c5dfc>] (bus_for_each_dev+0x70/0xa4)

[   94.642477]  r7:00000000 r6:c03c7c88 r5:bf033cf8 r4:00000000

[   94.642485] [<c03c5d8c>] (bus_for_each_dev) from [<c03c747c>] (driver_attach+0x24/0x28)

[   94.642491]  r6:bf007b64 r5:dddef000 r4:bf033cf8

[   94.642499] [<c03c7458>] (driver_attach) from [<c03c70c4>] (bus_add_driver+0x1a8/0x220)

[   94.642508] [<c03c6f1c>] (bus_add_driver) from [<c03c823c>] (driver_register+0x80/0x100)

[   94.642516]  r7:ddd27800 r6:c08babe0 r5:bf037000 r4:bf033cf8

[   94.642528] [<c03c81bc>] (driver_register) from [<bf0078c4>] (register_virtio_driver+0x30/0x44 [virtio])

[   94.642533]  r5:bf037000 r4:00000000

[   94.642553] [<bf007894>] (register_virtio_driver [virtio]) from [<bf037044>] (rpmsg_init+0x44/0x84 [virtio_rpmsg_bus])

[   94.642571] [<bf037000>] (rpmsg_init [virtio_rpmsg_bus]) from [<c00096d4>] (do_one_initcall+0x98/0x1e4)

[   94.642576]  r5:bf037000 r4:c08babe0

[   94.642593] [<c000963c>] (do_one_initcall) from [<c00b0b84>] (do_init_module+0x68/0x384)

[   94.642603]  r10:bf033e00 r9:222d89dc r8:ddd27648 r7:00000001 r6:ddd27700 r5:00000001

[   94.642606]  r4:bf033e00

[   94.642621] [<c00b0b1c>] (do_init_module) from [<c0092044>] (load_module+0x1d3c/0x1f90)

[   94.642627]  r6:ddd27640 r5:00000001 r4:ddd77f44

[   94.642636] [<c0090308>] (load_module) from [<c0092484>] (SyS_finit_module+0x88/0x98)

[   94.642645]  r10:00000000 r9:ddd76000 r8:c000fb84 r7:0000017b r6:000acb8b r5:00000004

[   94.642648]  r4:00000000

[   94.642661] [<c00923fc>] (SyS_finit_module) from [<c000f9c0>] (ret_fast_syscall+0x0/0x44)

[   94.642667]  r6:00000000 r5:ffffffff r4:7fffffff

[   94.642676] Code: 03800001 e3500000 1a000002 e5922024 (e5823020)

[   95.281018] —[ end trace 0000000000000003 ]—

Segmentation fault

其中包含几个问题

 ***  Unable to handle kernel NULL pointer dereference at virtual address 00000020

***   Internal error: Oops: 817 [#1] PREEMPT ARM

***   Segmentation fault

请帮忙分析问题产生原因,

2)User Space Communication阶段

执行modprobe pru_rproc执行后,ls /dev/ 未出现“There should be a character device named rpmsg_pru31 (since 31 was the CHAN_PORT in the PRU firmware)”现象,请问该问题出现在哪儿?

谢谢

Jian Zhou:

我看你用的是rt版本的linux,能否换成普通Linux试一下。

郑州–大胜:

回复 Jian Zhou:

rt版本的linux 换成普通Linux  ,这是什么原因  ??? 

郑州–大胜:

回复 Jian Zhou:

更换为sdk   ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install中的普通linux 版

编写调试结果为:

modprobe pru_rproc[ 221.185458] pru_rproc: Unknown symbol rproc_boot (err 0)[ 221.190892] pru_rproc: Unknown symbol rproc_add (err 0)[ 221.196458] pru_rproc: Unknown symbol pruss_intc_trigger (err 0)[ 221.202626] pru_rproc: Unknown symbol rproc_shutdown (err 0)[ 221.208336] pru_rproc: Unknown symbol pruss_intc_unconfigure (err 0)[ 221.215529] pru_rproc: Unknown symbol rproc_put (err 0)[ 221.220918] pru_rproc: Unknown symbol rproc_alloc (err 0)[ 221.227482] pru_rproc: Unknown symbol pruss_intc_configure (err 0)[ 221.233997] pru_rproc: Unknown symbol rproc_vq_interrupt (err 0)[ 221.240062] pru_rproc: Unknown symbol rproc_del (err 0)[ 221.245361] pru_rproc: Unknown symbol pruss_cfg_set_gpmux (err 0)[ 221.252355] pru_rproc: Unknown symbol rproc_boot (err 0)[ 221.257725] pru_rproc: Unknown symbol rproc_add (err 0)[ 221.263100] pru_rproc: Unknown symbol pruss_intc_trigger (err 0)[ 221.269148] pru_rproc: Unknown symbol rproc_shutdown (err 0)[ 221.274896] pru_rproc: Unknown symbol pruss_intc_unconfigure (err 0)[ 221.281319] pru_rproc: Unknown symbol rproc_put (err 0)[ 221.286677] pru_rproc: Unknown symbol rproc_alloc (err 0)[ 221.292134] pru_rproc: Unknown symbol pruss_intc_configure (err 0)[ 221.298389] pru_rproc: Unknown symbol rproc_vq_interrupt (err 0)[ 221.304466] pru_rproc: Unknown symbol rproc_del (err 0)[ 221.309728] pru_rproc: Unknown symbol pruss_cfg_set_gpmux (err 0)[ 221.387431] ti-pruss 4a300000.pruss: creating PRU cores and other child platform devices[ 221.433692] remoteproc0: 4a334000.pru0 is available[ 221.438713] remoteproc0: Note: remoteproc is still under development and considered experimental.[ 221.458310] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.[ 221.469444] pru-rproc 4a334000.pru0: booting the PRU core manually[ 221.475918] remoteproc0: powering up 4a334000.pru0[ 221.481000] remoteproc0: Booting fw image am335x-pru0-fw, size 27408[ 221.487613] remoteproc0: remote processor 4a334000.pru0 is now up[ 221.493909] pru-rproc 4a334000.pru0: PRU rproc node /ocp/pruss@4a300000/pru0@4a334000 probed successfully[ 221.504158] remoteproc1: 4a338000.pru1 is available[ 221.509159] remoteproc1: Note: remoteproc is still under development and considered experimental.[ 221.518218] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.[ 221.529462] remoteproc1: registered virtio0 (type 7)[ 221.540348] pru-rproc 4a338000.pru1: PRU rproc node /ocp/pruss@4a300000/pru1@4a338000 probed successfully

modprobe uio_pruss[ 496.723915] uio_pruss: Unknown symbol __uio_register_device (err 0)[ 496.730439] uio_pruss: Unknown symbol uio_unregister_device (err 0)[ 496.737812] uio_pruss: Unknown symbol __uio_register_device (err 0)[ 496.744443] uio_pruss: Unknown symbol uio_unregister_device (err 0)[root@ZHU firmware]$lsmoduio_pruss 3234 0 – Live 0xbf04f000uio 9185 1 uio_pruss, Live 0xbf048000pru_rproc 11796 1 – Live 0xbf035000pruss_intc 7163 1 pru_rproc, Live 0xbf02f000pruss 10892 1 pru_rproc, Live 0xbf028000remoteproc 26773 2 pru_rproc,pruss, Live 0xbf01b000virtio 7614 1 remoteproc, Live 0xbf015000virtio_ring 12163 1 remoteproc, Live 0xbf00e000

以上是采用普通linux测试结果,

但是,上述问题仍然纯在

赞(0)
未经允许不得转载:TI中文支持网 » 基于BealgeBone Black 的PRU-ICSS测试问题
分享到: 更多 (0)