RPMsg Tesla
From OMAPpedia
"Tesla" is the name for the DSP core in OMAP4.
Contents |
[edit] BIOS side
[edit] Setup
- Repo: sysbios-rpmsg
- Clone: git clone git://git.omapzoom.org/repo/sysbios-rpmsg.git
- Branch rpmsg-1.10
- Tag: 1.10.04.12
Note: Make sure you use tag 1.10.04.12 or beyond. Before this tag there is no Tesla Support.
For building a Tesla baseimage you will need the next tool setup
- BIOS: BIOS 6.32.01.38
- XDC: XDC 3.22.03.41
- IPC: IPC 1.23.01.26
- C64CGT: CGT6x 7.2.0
Prerequisties and build instructions are the same that the ones used for building Ducati. You can refer to RPMsg BIOS Sources
[edit] Build
For building Tesla, it is mandatory to export the path for the C64 code generation tools. If this environment variable is not preset, no object will be built for C64 target.
export C6000CGTOOLPATH=/data/omapts/linux/dsp-tc/cgt6x-7.2.0
Optionally (but not necessarily) the path and version for the rest of the tools could be specified by environment variables, specially if they differ from the default ones
export BIOSTOOLSROOT=/data/omapts/linux/dsp-tc export XDCVERSION=xdctools_3_22_03_41 export BIOSVERSION=bios_6_32_01_38 export IPCVERSION=ipc_1_23_01_26
After building the sysbios-rpmsg (Tesla is supported only in rpmsg-1.10 branch) with
make
A default firmware binary, tesla-dsp.bin for omap4 and omap5-tesla-dsp.bin for omap5 is generated in the
The omap4 tesla-dsp.bin is generated by post-processing the ELF baseimage:
/src/ti/examples/srvmgr/ti_platform_omap4430_dsp/debug/test_omx_dsp.xe64T
The omap5-tesla-dsp.bin is generated after:
/src/ti/examples/srvmgr/ti_platform_omap54xx_dsp/debug/test_omx_dsp.xe64T
Copy the binary to your file system, usually to the lib/firmware library
For omap4:
sudo cp/src/utils/tesla-dsp.bin /lib/firmware/tesla-dsp.bin
For omap5 (binary file needs to be renamed):
sudo cp/src/utils/omap5-tesla-dsp.bin /lib/firmware/tesla-dsp.bin
[edit] Kernel side
[edit] Setup
- Repo: p-android-omap-3.0 or p-android-omap-3.1
- Clone: git://git.omapzoom.org/kernel/omap.git
- Branch: p-android-omap-3.0 or p-android-omap-3.1
Note: Make sure you take the changes up to this 08/15408/9 patch or beyond this. Below this patch there is no Tesla support for p-android-omap-3.0. For p-android-omap-3.1 refer to this patch
[edit] Build
In order to enable Tesla support, select the OMAP remoteproc support for DSP option in the Device Drivers section in menuconfig
make menuconfig
[edit] Booting with Tesla enabled
[edit] Boot
After booting with both Tesla and Ducati enabled, rpmsg/kernel traces like below should be seen.
[ 6.064880] omap-rproc omap-rproc.0: Loaded BIOS image tesla-dsp.bin, size 206336 [ 6.076660] omap-rproc omap-rproc.1: Loaded BIOS image ducati-m3.bin, size 333812 [ 6.138946] omap-rproc omap-rproc.1: BIOS image version is 2 [ 6.148498] omap-rproc omap-rproc.0: BIOS image version is 2 [ 6.218841] omap_hwmod: ipu: failed to hardreset [ 6.239532] rproc_check_poolmem: section size does not fit within carveout memory [ 6.275299] omap_hwmod: dsp: failed to hardreset [ 6.281219] omap-iommu omap-iommu.0: ducati: version 2.1 [ 6.292114] omap-iommu omap-iommu.1: tesla: version 2.0 [ 6.398406] omap-rproc omap-rproc.1: remote processor ipu is now up [ 6.413146] omap_rpmsg_mbox_callback: received echo reply from ipu ! [ 6.455017] omap_rpmsg_mbox_callback: received echo reply from ipu ! [ 6.531188] omap-rproc omap-rproc.0: remote processor dsp is now up [ 6.660583] omap_rpmsg_mbox_callback: received echo reply from ipu ! [ 6.802062] omap_rpmsg_mbox_callback: received echo reply from ipu ! [ 6.883239] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x32 [ 6.895538] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x33 [ 6.914886] virtio_rpmsg_bus virtio0: creating channel rpmsg-omx0 addr 0x3c [ 6.925109] rpmsg_omx rpmsg-omx0: new OMX connection srv channel: 1024 -> 60! [ 6.935516] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x32 [ 6.944305] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x33 [ 6.956420] virtio_rpmsg_bus virtio1: creating channel rpmsg-omx1 addr 0x3c [ 6.967590] rpmsg_omx rpmsg-omx1: new OMX connection srv channel: 1024 -> 60! [ 6.975799] omap_rpmsg_mbox_callback: received echo reply from dsp ! [ 6.982818] virtio_rpmsg_bus virtio2: creating channel rpmsg-client-sample addr 0x32 [ 6.994689] virtio_rpmsg_bus virtio2: creating channel rpmsg-client-sample addr 0x33 [ 7.005828] virtio_rpmsg_bus virtio2: creating channel rpmsg-omx2 addr 0x3c [ 7.019317] rpmsg_omx rpmsg-omx2: new OMX connection srv channel: 1024 -> 60!
Note: that 3 rpmsg-omx channels are created:
- rpmsg-omx0 for Ducati Core0
- rpmsg-omx1 for Ducati Core1
- rpmsg-omx2 for Tesla
If only Tesla is enabled (OMAP remoteproc support for IPU option is deselected) from menuconfig
[ 5.935607] omap-rproc omap-rproc.0: Loaded BIOS image tesla-dsp.bin, size 206336 [ 5.996520] omap-rproc omap-rproc.0: BIOS image version is 2 [ 6.085815] rproc_check_poolmem: section size does not fit within carveout memory [ 6.154846] omap_hwmod: dsp: failed to hardreset [ 6.179656] omap-iommu omap-iommu.1: tesla: version 2.0 [ 6.201141] omap-rproc omap-rproc.0: remote processor dsp is now up [ 6.258209] omap_rpmsg_mbox_callback: received echo reply from dsp ! [ 6.276580] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x32 [ 6.511535] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x33 [ 6.635040] virtio_rpmsg_bus virtio0: creating channel rpmsg-omx2 addr 0x3c [ 6.763549] rpmsg_omx rpmsg-omx2: new OMX connection srv channel: 1024 -> 60!
Here, only the dsp channel rpmsg-omx2 is created.
[edit] Tesla debugging features
In order to check Tesla traces, make sure the debugfs directory is mounted or mount it by
# mount -t debugfs debugfs /d
Tesla has been assigned with the remoteproc index 0. So you should refer as the omap-rproc.0 in some of the debug options
To dump the Tesla version:
# cat /d/remoteproc/omap-rproc.0/version rpmsg: 1.10.04.12-3-gf79b343 core0: 1.10.04.12-3-gf79b343 xdctools_3_22_03_41 ipc_1_23_01_26 bios_6_32_01_38 cgt6x-7.2.0
To dump Tesla traces:
# cat /d/remoteproc/omap-rproc.0/trace0 [ 0.000] 10 IpcMemory entries at 20000010 [ 0.000] DEH: Watchdog started [ 0.000] DSP starting.. [ 0.000] copyTask 50: Entered...: [ 0.000] VirtQueue_startup: buf_addr address of 0xa0000000 received [ 0.001] registering rpmsg-client-sample service on 50 with HOST [ 0.001] copyTask 51: Entered...: [ 0.001] registering rpmsg-client-sample service on 51 with HOST [ 0.002] serviceMgr: started on port: 60 [ 0.002] registering rpmsg-omx2 service on 60 with HOST
[edit] Running omx sample
For building the omx_sample_multi follow the same instructions used for build the regular omx_sample at 3.3 OMX Sample using the sources from
For running the sample provide the tesla processor id (2) as argument:
# ./omx_sample_multi 2 [ 412.858337] rpmsg_omx rpmsg-omx2: local addr assigned: 0x401 [ 412.884246] omap_hwmod: dsp: failed to hardreset [ 412.889801] omap-iommu omap-iommu.1: tesla: version 2.0 [ 412.900878] rpmsg_omx rpmsg4: conn rsp: status 0 addr 101 omx_sample: Connected to OMX [ 412.909332] rpmsg_omx rpmsg-omx2: Disconnecting from OMX service at 101 omx_sample (1): OMX_GetHandle (H264_decoder). msg_id: 99, fxn_idx: 5, data_size: 13, data: OMX_Callback omx_sample (1): Got omx_handle: 0x5c0ffee5 omx_sample(1): OMX_SetParameter (0x5c0ffee5) omx_sample (1): Got result 0 omx_sample: Closed connection to OMX!
# cat /d/remoteproc/omap-rproc.0/trace0 . . . . . . . . . [ 4.943] serviceMgr: received msg type: 0 from addr: 1025 [ 4.943] serviceMgr: CONN_REQ: len: 4, name: OMX [ 4.945] createService: new OMX Service at endpoint: 101 [ 4.945] serviceMgr: Replying with msg type: 1 to addr: 1025 from: 60 [ 4.963] serviceMgr: received msg type: 4 from addr: 1025 [ 4.963] serviceMgr: OMX_DISCONNECT: len 4, addr: 101 [ 4.964] RcmServer_serverThrFxn_P: Exiting thread. [ 4.964] deleteService: removed RcmServer at endpoint: 101