I'm encountering problems starting the DSP after it has previously been started with a different firmware file. My initial clue that something was wrong was getting into an endless MessageQ_open() loop, trying to open the DSP slave messageq.
System Background:
- Dynamic DSP Loading
- On our system we dynamically start and stop DSP1 and DSP2
- We utilize the /sys/bus/platform/drivers/omap-rproc/[bind,unbind] nodes to do this
- We always stop the DSP (unbind) before starting the DSP the next time (bind)
- Multiple DSP Firmware Files
- When we start the DSPs we specify different firmware files to load by utilizing symlinks. For example, /lib/firmware/dra7-dsp1-fw.xe66 points to /tmp/dsp1_firmware which points to whatever DSP firmware we want to load at that instant.
- Thus, we regularly change the DSP firmware running on a given DSP
- The flow would be stop DSP (unbind), update symlink to new firmware file, start DSP (bind)
- Versions
- Processor SDK 03.02.00.05
This works (my example focuses on DSP1 for brevity):
- Fresh power up
- Set DSP1 firmware symlink to firmware 'A'
- Load rproc/rpmsg kernel modules, automatically loading DSP1 with firmware 'A'
- Stop DSP1 (via unbind node)
- Start DSP1 (via bind node)
This does not work:
- Fresh power up
- Set DSP1 firmware symlink to firmware 'A'
- Load rproc/rpmsg kerneo modules, automatically loading DSP1 with firmware 'A'
- Stop DSP1 (via unbind node)
- Set DSP1 firmware symlink to firmware 'B'
- Start DSP1 (via bind node) with firmware 'B'
If I look at the LAD log I see the following for the case that does not work:
[18.539938] NameServer_attach: connect failed: procId=4, errno=22 (Invalid argument)
[18.539961] closing send socket: 5
[18.539989] NameServer_attach: <-- refCount=0, status=-1
I've found that adding a huge delay of 15 seconds in between starting the DSP (via bind node) and doing the Ipc_start()/MessageQ calls the problem goes away. Unfortunately, the 15 second delay is unacceptable from a system performance perspective. I don't understand why this problem doesn't pop up if I stick to a single firmware file. The resource table is identical between firmware 'A' and 'B'.
Any suggestions?
Thanks