Hi,
i wonder if it is possible to reload PRU-Firmware with the pru_rproc-framework without rebooting the whole system. I've built the pruss_remoteproc-driver as a module, so i could load and unload it to exchange the running PRU-firmware. Unfortunately removing the pruss_remoteproc results in something like this:
root@beaglebone-black:~# rmmod pruss_remoteproc
[ 5560.548652] pruss-rproc 4a300000.pruss: remove platform devices for PRU cores
[ 5560.574694] Unable to handle kernel NULL pointer dereference at virtual address 00000018
[ 5560.583635] pgd = db008000
[ 5560.586507] [00000018] *pgd=00000000
[ 5560.590313] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 5560.595902] Modules linked in: musb_dsps musb_hdrc tda998x tilcdc drm_kms_helper pruss_remoteproc(-) musb_am335x
[ 5560.606748] CPU: 0 PID: 8875 Comm: rmmod Not tainted 3.14.23+ #2
[ 5560.613064] task: db05e9c0 ti: db0b0000 task.ti: db0b0000
[ 5560.618767] PC is at release_resource+0x1c/0x88
[ 5560.623555] LR is at _raw_write_lock+0x4c/0x54
[ 5560.628234] pc : [<c004f858>] lr : [<c0837e8c>] psr: 600f0013
[ 5560.628234] sp : db0b1df8 ip : db0b1dd0 fp : db0b1e0c
[ 5560.640279] r10: 00000000 r9 : db0b0000 r8 : c000f644
[ 5560.645771] r7 : b6f4211c r6 : bf004a44 r5 : ddfd7800 r4 : ddfc0d80
[ 5560.652627] r3 : 00000000 r2 : 00000000 r1 : 00000011 r0 : c0c22bbc
[ 5560.659487] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 5560.666982] Control: 10c5387d Table: 9b008019 DAC: 00000015
[ 5560.673021] Process rmmod (pid: 8875, stack limit = 0xdb0b0248)
[ 5560.679241] Stack: (0xdb0b1df8 to 0xdb0b2000)
[ 5560.683831] 1de0: 00000001 ddfd7800
[ 5560.692431] 1e00: db0b1e24 db0b1e10 c052abc8 c004f848 ddfd7800 00000000 db0b1e3c db0b1e28
[ 5560.701029] 1e20: c052ac0c c052ab60 ddfd7810 00000000 db0b1e4c db0b1e40 bf004a58 c052ac04
[ 5560.709626] 1e40: db0b1e74 db0b1e50 c0524eec bf004a50 dd921d80 ddfc0e30 db0b1e8c dd920010
[ 5560.718225] 1e60: dd920000 c0c2105c db0b1e94 db0b1e78 bf004a9c c0524eac bf004a60 dd920010
[ 5560.726822] 1e80: bf0064f4 dd920044 db0b1ea4 db0b1e98 c052a560 bf004a6c db0b1ebc db0b1ea8
[ 5560.735420] 1ea0: c0528a34 c052a550 dd920010 bf0064f4 db0b1edc db0b1ec0 c05293fc c05289c8
[ 5560.744018] 1ec0: 00000000 bf0064f4 bf006750 00000000 db0b1ef4 db0b1ee0 c0528690 c052934c
[ 5560.752616] 1ee0: bf005554 bf0064f4 db0b1f0c db0b1ef8 c0529a74 c0528634 bf005554 bf0064cc
[ 5560.761213] 1f00: db0b1f1c db0b1f10 c052ace8 c0529a50 db0b1f34 db0b1f20 bf005578 c052ace0
[ 5560.769811] 1f20: bf005554 c0be6488 db0b1fa4 db0b1f38 c00c4c28 bf005560 00000000 bf006750
[ 5560.778408] 1f40: 00000800 db0b1f38 73757270 65725f73 65746f6d 636f7270 00000000 db0b1f68
[ 5560.787006] 1f60: c009694c c0096710 b6f420e8 b6f420e8 bea6eef2 00000081 db0b1f94 db0b1f88
[ 5560.795604] 1f80: 00096a38 bd943639 b6f420e8 b6f420e8 bea6eef2 00000081 00000000 db0b1fa8
[ 5560.804202] 1fa0: c000f480 c00c4abc b6f420e8 b6f420e8 b6f4211c 00000800 8e7ab100 8e7ab100
[ 5560.812799] 1fc0: b6f420e8 b6f420e8 bea6eef2 00000081 bea6ee0c 00000000 bea6ec18 00000000
[ 5560.821397] 1fe0: b6e93811 bea6ebac b6f25613 b6e93816 80000030 b6f4211c 656e6e6f 20656c6c
[ 5560.829973] Backtrace:
[ 5560.832606] [<c004f83c>] (release_resource) from [<c052abc8>] (platform_device_del+0x74/0xa4)
[ 5560.841552] r5:ddfd7800 r4:00000001
[ 5560.845369] [<c052ab54>] (platform_device_del) from [<c052ac0c>] (platform_device_unregister+0x14/0x28)
[ 5560.855222] r5:00000000 r4:ddfd7800
[ 5560.859069] [<c052abf8>] (platform_device_unregister) from [<bf004a58>] (pru_rproc_unregister+0x14/0x1c [pruss_remoteproc])
[ 5560.870743] r4:00000000 r3:ddfd7810
[ 5560.874586] [<bf004a44>] (pru_rproc_unregister [pruss_remoteproc]) from [<c0524eec>] (device_for_each_child+0x4c/0x78)
[ 5560.885836] [<c0524ea0>] (device_for_each_child) from [<bf004a9c>] (pruss_remove+0x3c/0x68 [pruss_remoteproc])
[ 5560.896327] r6:c0c2105c r5:dd920000 r4:dd920010
[ 5560.901264] [<bf004a60>] (pruss_remove [pruss_remoteproc]) from [<c052a560>] (platform_drv_remove+0x1c/0x20)
[ 5560.911574] r6:dd920044 r5:bf0064f4 r4:dd920010 r3:bf004a60
[ 5560.917614] [<c052a544>] (platform_drv_remove) from [<c0528a34>] (__device_release_driver+0x78/0xd0)
[ 5560.927212] [<c05289bc>] (__device_release_driver) from [<c05293fc>] (driver_detach+0xbc/0xc0)
[ 5560.936248] r5:bf0064f4 r4:dd920010
[ 5560.940060] [<c0529340>] (driver_detach) from [<c0528690>] (bus_remove_driver+0x68/0xdc)
[ 5560.948550] r6:00000000 r5:bf006750 r4:bf0064f4 r3:00000000
[ 5560.954586] [<c0528628>] (bus_remove_driver) from [<c0529a74>] (driver_unregister+0x30/0x50)
[ 5560.963440] r4:bf0064f4 r3:bf005554
[ 5560.967256] [<c0529a44>] (driver_unregister) from [<c052ace8>] (platform_driver_unregister+0x14/0x18)
[ 5560.976928] r4:bf0064cc r3:bf005554
[ 5560.980755] [<c052acd4>] (platform_driver_unregister) from [<bf005578>] (pruss_exit+0x24/0x28 [pruss_remoteproc])
[ 5560.991560] [<bf005554>] (pruss_exit [pruss_remoteproc]) from [<c00c4c28>] (SyS_delete_module+0x178/0x1f4)
[ 5561.001687] r4:c0be6488 r3:bf005554
[ 5561.005513] [<c00c4ab0>] (SyS_delete_module) from [<c000f480>] (ret_fast_syscall+0x0/0x48)
[ 5561.014185] r7:00000081 r6:bea6eef2 r5:b6f420e8 r4:b6f420e8
[ 5561.020222] Code: e1a04000 e59f006c eb1fa17a e5943010 (e5932018)
[ 5561.043470] ---[ end trace 638fc60247830cc2 ]---
[ 5561.048371] note: rmmod[8875] exited with preempt_count 1
Segmentation fault
What is the recommened way to reload/exchange the PRUSS' firmware without reboot?
Thanks.