Hi all,
I’ve done a few searches and couldn’t find any threads or “conversations” in this forum/group on the remoteproc kernel module for loading firmware onto the PRUs.
The remoteproc framework is supposed to be a Linux standard, there are some generic documents for it, but I’ve only found a general diagram and explanation in TIs SDK docs for their implementation.
Simple code to flash LEDs loads and runs fine, but larger, more complicated code that also just flashes LEDs fails to load, occasionally parts of it run, or none of it runs and the there’s a bit of a stack trace in dmesg.
The first line of the error in dmesg is:
44000000.ocp:L3 Standard Error: MASTER PRUSS2 PRU1 TARGET PCIE1 (Read): At Address: 0x00806664 : Data Access in Supervisor mode during Functional access
Is this resource_table related? Or its meaning that there’s a strange memory access?
I’m trying to find out:
- How to get verbose info that shows what the pru_rproc kernel module is doing
- How to configure it, maybe commandline, or through the sysfs
- Documentation of how it functions, and what it expects, such as the resource_table and firmware layout to match, how it handles errors etc.
Thanks,
Fisher
Here’s my dmesg:
[ 76.711182] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[ 76.736257] IPv6: ADDRCONF(NETDEV_CHANGE): usb1: link becomes ready
[ 77.894970] NOHZ: local_softirq_pending 08
[ 77.903344] NOHZ: local_softirq_pending 08
[ 77.923339] NOHZ: local_softirq_pending 08
[ 77.967346] NOHZ: local_softirq_pending 08
[ 77.977416] NOHZ: local_softirq_pending 08
[ 78.009731] NOHZ: local_softirq_pending 08
[ 78.227509] NOHZ: local_softirq_pending 08
[ 78.414768] NOHZ: local_softirq_pending 08
[ 78.478154] NOHZ: local_softirq_pending 08
[ 78.483369] NOHZ: local_softirq_pending 08
[ 139.787136] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 139.792152] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 139.792176] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 152.475360] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 207.719337] pru-rproc 4b2b4000.pru: can’t provide a NULL firmware
[ 234.455246] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 234.455834] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 369696
[ 234.455878] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 241.915304] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 254.522378] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 254.522557] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 254.522577] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 257.559216] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 375.451166] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 375.451886] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 369696
[ 375.451931] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 380.203249] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 387.895263] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 387.895392] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 387.895411] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 390.959144] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 407.879207] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 407.879755] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 369696
[ 407.879800] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 425.139157] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 628.915190] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 628.915736] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 369876
[ 628.915780] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 840.639171] pru-rproc 4b2b4000.pru: can’t change firmware while running
[ 845.259199] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 852.903126] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 852.903663] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 370028
[ 852.903716] ------------[ cut here ]------------
[ 852.903735] WARNING: CPU: 0 PID: 1810 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x368/0x3a4
[ 852.903744] 44000000.ocp:L3 Standard Error: MASTER PRUSS2 PRU1 TARGET PCIE1 (Read): At Address: 0x00806664 : Data Access in Supervisor mode during Functional access
[ 852.903750] Modules linked in: rpmsg_rpc rpmsg_proto pru_rproc pruss_intc bnep pruss pvrsrvkm(O) pruss_soc_bus ti_vpe ti_sc videobuf2_dma_contig ti_csc ti_vpdma v4l2_mem2mem v4l2_common videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media btsdio bluetooth joydev ecdh_generic brcmfmac stmpe_adc brcmutil cfg80211 omap_remoteproc virtio_rpmsg_bus rpmsg_core usb_f_ncm usb_f_mass_storage usb_f_rndis u_ether libcomposite uio_pdrv_genirq uio cmemk(O)
[ 852.903951] CPU: 0 PID: 1810 Comm: bash Tainted: G W O 4.14.108-ti-r137 #1buster
[ 852.903958] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 852.903979] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 852.903994] [] (show_stack) from [] (dump_stack+0x80/0x94)
[ 852.904007] [] (dump_stack) from [] (__warn+0xec/0x114)
[ 852.904019] [] (__warn) from [] (warn_slowpath_fmt+0x58/0x74)
[ 852.904032] [] (warn_slowpath_fmt) from [] (l3_interrupt_handler+0x368/0x3a4)
[ 852.904048] [] (l3_interrupt_handler) from [] (__handle_irq_event_percpu+0x84/0x2d0)
[ 852.904061] [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x3c/0x90)
[ 852.904072] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x48/0x6c)
[ 852.904085] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xd0/0x178)
[ 852.904098] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x34/0x44)
[ 852.904109] [] (generic_handle_irq) from [] (__handle_domain_irq+0x8c/0xfc)
[ 852.904121] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x88)
[ 852.904133] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0xa8)
[ 852.904140] Exception stack(0xce9bbc20 to 0xce9bbc68)
[ 852.904151] bc20: c104179c ce9bbcac 00000053 c104179f ce9bbcac c104179c ce9bbd0c d3761420
[ 852.904162] bc40: c108c08c ce9bbdac ce9bbcac ce9bbc8c ce9bbc90 ce9bbc70 c0cc6b40 c0cc2d90
[ 852.904169] bc60: 20010013 ffffffff
[ 852.904182] [] (__irq_svc) from [] (format_decode+0x5c/0x5e8)
[ 852.904194] [] (format_decode) from [] (vsnprintf+0x84/0x3f4)
[ 852.904206] [] (vsnprintf) from [] (snprintf+0x38/0x54)
[ 852.904221] [] (snprintf) from [] (dev_vprintk_emit+0x64/0x210)
[ 852.904235] [] (dev_vprintk_emit) from [] (dev_printk_emit+0x40/0x5c)
[ 852.904248] [] (dev_printk_emit) from [] (__dev_printk+0x58/0x98)
[ 852.904260] [] (__dev_printk) from [] (_dev_info+0x58/0x74)
[ 852.904276] [] (_dev_info) from [] (rproc_boot+0x574/0x634)
[ 852.904291] [] (rproc_boot) from [] (state_store+0x80/0x144)
[ 852.904305] [] (state_store) from [] (dev_attr_store+0x28/0x34)
[ 852.904319] [] (dev_attr_store) from [] (sysfs_kf_write+0x48/0x54)
[ 852.904332] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xf8/0x1dc)
[ 852.904346] [] (kernfs_fop_write) from [] (__vfs_write+0x28/0x48)
[ 852.904360] [] (__vfs_write) from [] (vfs_write+0xb4/0x1c8)
[ 852.904372] [] (vfs_write) from [] (SyS_write+0x5c/0xbc)
[ 852.904386] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x54)
[ 852.904393] —[ end trace 0de72da1c33b76f4 ]—
[ 852.904407] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 866.703170] pru-rproc 4b2b4000.pru: can’t change firmware while running
[ 869.891225] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 876.519176] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 876.519299] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 876.519318] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 879.759196] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 889.235104] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 889.235793] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 370028
[ 889.235848] ------------[ cut here ]------------
[ 889.235867] WARNING: CPU: 0 PID: 1810 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x368/0x3a4
[ 889.235875] 44000000.ocp:L3 Standard Error: MASTER PRUSS2 PRU1 TARGET PCIE1 (Read): At Address: 0x00806664 : Data Access in Supervisor mode during Functional access
[ 889.235881] Modules linked in: rpmsg_rpc rpmsg_proto pru_rproc pruss_intc bnep pruss pvrsrvkm(O) pruss_soc_bus ti_vpe ti_sc videobuf2_dma_contig ti_csc ti_vpdma v4l2_mem2mem v4l2_common videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media btsdio bluetooth joydev ecdh_generic brcmfmac stmpe_adc brcmutil cfg80211 omap_remoteproc virtio_rpmsg_bus rpmsg_core usb_f_ncm usb_f_mass_storage usb_f_rndis u_ether libcomposite uio_pdrv_genirq uio cmemk(O)
[ 889.236083] CPU: 0 PID: 1810 Comm: bash Tainted: G W O 4.14.108-ti-r137 #1buster
[ 889.236090] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 889.236111] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 889.236125] [] (show_stack) from [] (dump_stack+0x80/0x94)
[ 889.236139] [] (dump_stack) from [] (__warn+0xec/0x114)
[ 889.236151] [] (__warn) from [] (warn_slowpath_fmt+0x58/0x74)
[ 889.236164] [] (warn_slowpath_fmt) from [] (l3_interrupt_handler+0x368/0x3a4)
[ 889.236180] [] (l3_interrupt_handler) from [] (__handle_irq_event_percpu+0x84/0x2d0)
[ 889.236193] [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x3c/0x90)
[ 889.236204] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x48/0x6c)
[ 889.236216] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xd0/0x178)
[ 889.236229] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x34/0x44)
[ 889.236240] [] (generic_handle_irq) from [] (__handle_domain_irq+0x8c/0xfc)
[ 889.236252] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x88)
[ 889.236264] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0xa8)
[ 889.236271] Exception stack(0xce9bbc28 to 0xce9bbc70)
[ 889.236282] bc20: 0000000a ce9bbcac 00000025 c10417a6 ce9bbcac c104179c
[ 889.236292] bc40: ce9bbd0c d3761420 c108c08c ce9bbdac ce9bbcac ce9bbc8c ce9bbc90 ce9bbc78
[ 889.236300] bc60: c0cc6b40 c0cc2dac 20010013 ffffffff
[ 889.236314] [] (__irq_svc) from [] (format_decode+0x78/0x5e8)
[ 889.236326] [] (format_decode) from [] (vsnprintf+0x84/0x3f4)
[ 889.236338] [] (vsnprintf) from [] (snprintf+0x38/0x54)
[ 889.236353] [] (snprintf) from [] (dev_vprintk_emit+0x64/0x210)
[ 889.236367] [] (dev_vprintk_emit) from [] (dev_printk_emit+0x40/0x5c)
[ 889.236379] [] (dev_printk_emit) from [] (__dev_printk+0x58/0x98)
[ 889.236391] [] (__dev_printk) from [] (_dev_info+0x58/0x74)
[ 889.236406] [] (_dev_info) from [] (rproc_boot+0x574/0x634)
[ 889.236421] [] (rproc_boot) from [] (state_store+0x80/0x144)
[ 889.236435] [] (state_store) from [] (dev_attr_store+0x28/0x34)
[ 889.236450] [] (dev_attr_store) from [] (sysfs_kf_write+0x48/0x54)
[ 889.236463] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xf8/0x1dc)
[ 889.236477] [] (kernfs_fop_write) from [] (__vfs_write+0x28/0x48)
[ 889.236490] [] (__vfs_write) from [] (vfs_write+0xb4/0x1c8)
[ 889.236503] [] (vfs_write) from [] (SyS_write+0x5c/0xbc)
[ 889.236516] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x54)
[ 889.236524] —[ end trace 0de72da1c33b76f5 ]—
[ 889.236536] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 1267.955180] pru-rproc 4b2b4000.pru: can’t change firmware while running
[ 1271.783200] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 1281.595190] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 1281.595471] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 1281.595490] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 1284.647130] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 2370.791112] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 2370.791406] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 2370.791426] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 2376.151149] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 2380.387163] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 2380.387284] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 2380.387303] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 2382.287146] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 2393.327159] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 2393.327706] remoteproc remoteproc6: Booting fw image PRU_ucfsm.out, size 370028
[ 2393.327762] ------------[ cut here ]------------
[ 2393.327782] WARNING: CPU: 0 PID: 1810 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x368/0x3a4
[ 2393.327790] 44000000.ocp:L3 Standard Error: MASTER PRUSS2 PRU1 TARGET PCIE1 (Read): At Address: 0x00806664 : Data Access in Supervisor mode during Functional access
[ 2393.327796] Modules linked in: rpmsg_rpc rpmsg_proto pru_rproc pruss_intc bnep pruss pvrsrvkm(O) pruss_soc_bus ti_vpe ti_sc videobuf2_dma_contig ti_csc ti_vpdma v4l2_mem2mem v4l2_common videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media btsdio bluetooth joydev ecdh_generic brcmfmac stmpe_adc brcmutil cfg80211 omap_remoteproc virtio_rpmsg_bus rpmsg_core usb_f_ncm usb_f_mass_storage usb_f_rndis u_ether libcomposite uio_pdrv_genirq uio cmemk(O)
[ 2393.327996] CPU: 0 PID: 1810 Comm: bash Tainted: G W O 4.14.108-ti-r137 #1buster
[ 2393.328002] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 2393.328024] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 2393.328039] [] (show_stack) from [] (dump_stack+0x80/0x94)
[ 2393.328052] [] (dump_stack) from [] (__warn+0xec/0x114)
[ 2393.328064] [] (__warn) from [] (warn_slowpath_fmt+0x58/0x74)
[ 2393.328078] [] (warn_slowpath_fmt) from [] (l3_interrupt_handler+0x368/0x3a4)
[ 2393.328093] [] (l3_interrupt_handler) from [] (__handle_irq_event_percpu+0x84/0x2d0)
[ 2393.328107] [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x3c/0x90)
[ 2393.328118] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x48/0x6c)
[ 2393.328130] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xd0/0x178)
[ 2393.328143] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x34/0x44)
[ 2393.328154] [] (generic_handle_irq) from [] (__handle_domain_irq+0x8c/0xfc)
[ 2393.328166] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x88)
[ 2393.328178] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0xa8)
[ 2393.328185] Exception stack(0xce9bbc20 to 0xce9bbc68)
[ 2393.328196] bc20: c104179c ce9bbcac 00000025 c10417a6 ce9bbcac c104179c ce9bbd0c d3761420
[ 2393.328206] bc40: c108c08c ce9bbdac ce9bbcac ce9bbc8c ce9bbc90 ce9bbc70 c0cc6b40 c0cc2da4
[ 2393.328214] bc60: 20010013 ffffffff
[ 2393.328227] [] (__irq_svc) from [] (format_decode+0x70/0x5e8)
[ 2393.328239] [] (format_decode) from [] (vsnprintf+0x84/0x3f4)
[ 2393.328252] [] (vsnprintf) from [] (snprintf+0x38/0x54)
[ 2393.328267] [] (snprintf) from [] (dev_vprintk_emit+0x64/0x210)
[ 2393.328280] [] (dev_vprintk_emit) from [] (dev_printk_emit+0x40/0x5c)
[ 2393.328293] [] (dev_printk_emit) from [] (__dev_printk+0x58/0x98)
[ 2393.328305] [] (__dev_printk) from [] (_dev_info+0x58/0x74)
[ 2393.328320] [] (_dev_info) from [] (rproc_boot+0x574/0x634)
[ 2393.328335] [] (rproc_boot) from [] (state_store+0x80/0x144)
[ 2393.328348] [] (state_store) from [] (dev_attr_store+0x28/0x34)
[ 2393.328363] [] (dev_attr_store) from [] (sysfs_kf_write+0x48/0x54)
[ 2393.328377] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xf8/0x1dc)
[ 2393.328391] [] (kernfs_fop_write) from [] (__vfs_write+0x28/0x48)
[ 2393.328404] [] (__vfs_write) from [] (vfs_write+0xb4/0x1c8)
[ 2393.328416] [] (vfs_write) from [] (SyS_write+0x5c/0xbc)
[ 2393.328431] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x54)
[ 2393.328439] —[ end trace 0de72da1c33b76f6 ]—
[ 2393.328452] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 2397.083151] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
[ 2406.111125] remoteproc remoteproc6: powering up 4b2b4000.pru
[ 2406.111417] remoteproc remoteproc6: Booting fw image PRU-LEDs.out, size 32644
[ 2406.111437] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
[ 2408.331136] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru