Beaglebone Black PRU driver crash.

Manuel Stühn freebsdnewbie at freenet.de
Tue Aug 23 19:47:19 UTC 2016


> Hello Everyone,
>
> I’m currently working on an embedded project using the BBB as a base
> platform, and i want do decide if ill go with Linux or freebsd.
> After not having much success talking to the BBB PRU using Linux,
> ich wanted to give FreeBSD a try and the PRU gets detected (^-^)
> sadly the driver panics upon use, and i have no idea how
> to debug this.
>
> i use devel/pructl to load a file and waiting for an PRU interrupt
> ( pructl -w ) the binary loaded does not matter, you may use some null
> bytes.
> to reproduce.
>
>
> FreeBSD beaglebone 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r303880: Tue Aug  9
> 23:54:55 UTC 2016
> root at releng1.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE
>  arm
>
>
> the pru is detected on boot:
> ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem
> 0x4a300000-0x4a37ffff on simplebus0
>
>
> (kgdb) bt
> #0  0xc066c340 in savectx ()
> #1  0xc03a3038 in doadump ()
> #2  0xc0245aac in db_dump ()
> #3  0xc0245854 in db_command ()
> #4  0xc02455d4 in db_command_loop ()
> #5  0xc0248894 in db_trap ()
> #6  0xc03e0a80 in kdb_trap ()
> #7  0xc066df40 in undefinedinstruction ()
> #8  0xc06548d4 in exception_exit ()
> #9  0xc03e0334 in kdb_enter ()
> #10 0xc03a3264 in vpanic ()
> #11 0xc03a32b8 in panic ()
> #12 0xc038acb0 in __mtx_assert ()
> #13 0xc0363a68 in knlist_add ()
> #14 0xc0686ec0 in ti_pruss_kqfilter ()
> #15 0xc02ccf1c in devfs_kqfilter_f ()
> #16 0xc0361a94 in kqueue_register ()
> #17 0xc03625dc in kqueue_kevent ()
> #18 0xc03624c4 in kern_kevent_fp ()
> #19 0xc03623b4 in kern_kevent ()
> #20 0xc03621e8 in sys_kevent ()
> #21 0xc066cbfc in swi_handler ()
> #22 0xc0654864 in swi_exit ()
>
> sadly i don't have the symbols for this build to dig deeper.
>
> any ideas what might be the problem?
> anyone using the PRU with FreeBDS?
>
> Greetings,
> any help or insights woud be greatly appreciated ;-)
>
> Arne

Hi Arne,

the PRU-driver did work for me some time ago. Because I'd been using a 
CURRENT without options INVARIANTS/WITNESS, mtx_assert() did not cause a 
panic.

Please try the (untested) patch attached.

Manuel




-------------- next part --------------
A non-text attachment was scrubbed...
Name: ti_pruss.c.diff
Type: text/x-patch
Size: 442 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160823/ee96b096/attachment.bin>


More information about the freebsd-arm mailing list