I have been trying to get the IPC demo working on the keystone2 and I have been having some difficulty in getting MessageQApp to work.
My procedure from a reboot is the following:
1) Start the DSP
root@keystone-evm:/lib/firmware# mpmcl reset dsp0
reset succeeded
root@keystone-evm:/lib/firmware# mpmcl reset dsp1
reset succeeded
root@keystone-evm:/lib/firmware# mpmcl load dsp0 messageq_single.xe66
load succeeded
root@keystone-evm:/lib/firmware# mpmcl run dsp0
run succeeded
Checking the trace buffer seems okay:
root@keystone-evm:/usr/local/bin# cat /debug/remoteproc/remoteproc0/trace0
3 Resource entries at 0x800000
messageq_single.c:main: MultiProc id = 1
registering rpmsg-proto service on 61 with HOST
tsk1Fxn: created MessageQ: SLAVE_CORE0; QueueID: 0x10000
Awaiting sync message from host...
root@keystone-evm:/usr/local/bin#
This is interesting. Note that I do get the following log messages which indicate to me that some basic communication is happening between the ARM and the DSP.
[ 76.862704] remoteproc0: powering up 2620040.dsp0
[ 76.867348] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 76.871861] remoteproc0: registered virtio0 (type 7)
[ 76.876450] virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
[ 76.882268] rpmsg_proto rpmsg0: inserting rpmsg src: 1024, dst: 61
2) Start the ARM
root@keystone-evm:/usr/local/bin# ./MessageQApp
Ipc_start: NameServer_setup() failed: -1
Using numLoops: 100; procId : 1
Ipc_start failed: status = -1
root@keystone-evm:/usr/local/bin#
Looking at the LAD output .....
root@keystone-evm:/usr/local/bin# cat /var/tmp/LAD/lad.txt
Initializing LAD...
opening FIFO: /tmp/LAD/LADCMDS
Retrieving command...
LAD_CONNECT:
client FIFO name = /tmp/LAD/1817
client PID = 1817
assigned client handle = 0
FIFO /tmp/LAD/1817 created
FIFO /tmp/LAD/1817 opened for writing
sent response
DONE
Retrieving command...
LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
MultiProc_getConfig() - 9 procs
Proc 0 - "HOST"
Proc 1 - "CORE0"
Proc 2 - "CORE1"
Proc 3 - "CORE2"
Proc 4 - "CORE3"
Proc 5 - "CORE4"
Proc 6 - "CORE5"
Proc 7 - "CORE6"
Proc 8 - "CORE7"
status = 0
DONE
Sending response...
Retrieving command...
LAD_NAMESERVER_SETUP: calling NameServer_setup()...
NameServer_setup: entered, refCount=0
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: socket failed: 97, Address family not supported by protocol
NameServer_setup: creating listener thread
NameServer_setup: exiting, refCount=1
status = -1
DONE
listener_cb: Entered Listener thread.
Sending response...
NameServer: waiting for unblockFd: 2, and socks: maxfd: 3
Retrieving command...
EOF detected on FIFO, closing FIFO: /tmp/LAD/LADCMDS
opening FIFO: /tmp/LAD/LADCMDS
root@keystone-evm:/usr/local/bin#
Two other items are:
- the NameServerApp works as long as it is the first to run. MessageQApp failures cause the LAD daemon to get into a funky state.
- ping_rpmsg does not work. I get the following error.
root@keystone-evm:/usr/local/bin# ./ping_rpmsg
socket failed: Address family not supported by protocol (97)
It seems that if I can get past this socket problem, the system ought to work.