我将IQmath的函数、数据放到L2SRam后,感觉效率提升不是很明显,所以将L1cache设小,得到L1DSRam、L1PSram。我将IQmath的函数、数据分别放到对应的sram中,但是程序加载不成功。
平台环境:am5728的DSP核运行ti-rtos,ccs6.13,arm核运行linux
启动时加载错位信息如下:
[ 10.128031] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@97C00000
[ 10.138952] remoteproc0: 40800000.dsp is available
[ 10.143864] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 10.154471] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
GetSockObjectByName(OTSERVICE_NAME) fail "languageswitch:"
libpng warning: iCCP: known incorrect sRGB profile
sh: ./numlockx: No such file or directory
socket fd: 9
PHY xx - 0/Half Auto-negotiation: on Unknown! (0)
Unknown! (255)
Down
"speed=0 duplex=0 autoneg=1 link=0"
eth0 is Down!!!
[ OK ] Started gdbserverproxy.service.
Starting thermal-zone-init.service...
[ OK ] Started thermal-zone-init.service.
/sbin/ldconfig: /lib/libstdc++.so.6.0.21-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
[ 10.376612] remoteproc0: registered virtio0 (type 7)
[ 10.389528] remoteproc0: powering up 40800000.dsp
[ 10.405569] remoteproc0: Booting fw image dra7-dsp1-fw.xe66, size 11228812
[ 10.419366] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 10.425281] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 10.506093] remoteproc0: bad phdr da 0xe00000 mem 0x340
[ 10.511440] remoteproc0: Failed to load program segments: -22
[ 10.517416] remoteproc0: failed to unmap 8388608/19922944
[ 10.524626] remoteproc0: failed to unmap 25165824/0
[ 10.529670] remoteproc0: failed to unmap 3145728/16777216
[ 10.555036] remoteproc0: failed to unmap 104857600/1048576
[ 10.561615] remoteproc0: failed to unmap 1089470464/37748736
[ 10.567435] remoteproc0: failed to unmap 1088421888/1048576
[ 10.591591] remoteproc0: rproc_boot() failed -22
[ 10.596340] virtio_rpmsg_bus: probe of virtio0 failed with error -22
[ 12.193746] remoteproc1: releasing 41000000.dsp
[ 12.240622] cpsw 48484000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 12.248565] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 12.400708] omap-rproc 41000000.dsp: assigned reserved memory node dsp2_cma@A0400000
[ 12.408536] remoteproc1: 41000000.dsp is available
[ 12.413433] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 12.424275] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 12.554250] remoteproc1: powering up 41000000.dsp
[ 12.559086] remoteproc1: Booting fw image dra7-dsp2-fw.xe66, size 8537912
[ 12.572665] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 12.578581] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 12.609362] remoteproc1: remote processor 41000000.dsp is now up
[ 12.615756] ------------[ cut here ]------------
[ 12.620396] WARNING: CPU: 0 PID: 4 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x368()
[ 12.629741] 44000000.ocp:L3 Custom Error: MASTER DSP2_DMA TARGET L4_PER3_P3 (Idle): Data Access in User mode during Functional access
[ 12.641787] Modules linked in: virtio_rpmsg_bus bc_example(O) sha512_generic sha512_arm sha1_generic sha1_arm_neon sha1_arm md5 jitterentropy_rng sha256_generic sha256_arm hmac drbg des_generic cbc xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) pwm_fan cryptodev(O) pwm_omap_dmtimer cmemk(O) pvrsrvkm(O) omap_wdt rtc_omap m25p80 extcon_palmas omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring
[ 12.686043] CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G O 4.4.19-g1c6ad78 #1
[ 12.694164] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 12.700283] Workqueue: events request_firmware_work_func
[ 12.705619] Backtrace:
编译文件的map部分信息
===========================================================
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
L2SRAM 00800000 00020000 00000000 00020000 RW X
L1PSRAM 00e00000 00004000 00000340 00003cc0 RW X
L1DSRAM 00f00000 00004000 00000b1c 000034e4 RW
OCMC_RAM1 40300000 00080000 00000000 00080000 RW X
OCMC_RAM2 40400000 00100000 00000000 00100000 RW X
OCMC_RAM3 40500000 00100000 00000000 00100000 RW X
SR_0 97b00000 00100000 00100000 00000000 RW X
EXT_CODE 97d00000 00800000 000acea0 00753160 RW X
EXT_DATA 98500000 01800000 01078f50 007870b0 RW
EXT_HEAP 99d00000 00300000 00000000 00300000 RW
TRACE_BUF 9f000000 00060000 00008004 00057ffc RW
EXC_DATA 9f060000 00010000 00000000 00010000 RW
PM_DATA 9f070000 00020000 00000000 00020000 RW X
CMEM a6800000 08000000 00000000 08000000 RW
SEGMENT ALLOCATION MAP
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00e00000 00e00000 00000340 00000340 r-x
00e00000 00e00000 00000340 00000340 r-x IQFuncs
00f00000 00f00000 00000a04 00000a04 r--
00f00000 00f00000 00000a04 00000a04 r-- .const:IQsinTable
00f00a08 00f00a08 00000118 00000000 rw-
00f00a08 00f00a08 000000f0 00000000 rw- .fardata:IQexpTableMinMax
00f00af8 00f00af8 00000028 00000000 rw- .fardata:IQexpTableCoeff
97d00000 97d00000 000006e0 000006e0 rw-
97d00000 97d00000 000006e0 000006e0 rw- .resource_table
97d006e0 97d006e0 000ac5c0 000ac5c0 r-x
97d006e0 97d006e0 000ac5c0 000ac5c0 r-x .text
=====================================================
LINKER GENERATED COPY TABLES
__TI_cinit_table @ 99578f48 records: 7, size/record: 8, table size: 56
.fardata: load addr=99576d68, load size=0000204e bytes, run addr=9950bf00, run size=000539e2 bytes, compression=rle
.fardata:IQexpTableMinMax: load addr=99578db8, load size=000000f5 bytes, run addr=00f00a08, run size=000000f0 bytes, compression=rle
.neardata: load addr=99578eb0, load size=0000003d bytes, run addr=99576998, run size=00000194 bytes, compression=rle
.fardata:IQexpTableCoeff: load addr=99578ef0, load size=0000002e bytes, run addr=00f00af8, run size=00000028 bytes, compression=rle
.bss: load addr=99578f2c, load size=00000008 bytes, run addr=99576958, run size=0000003c bytes, compression=zero_init
.far: load addr=99578f34, load size=00000008 bytes, run addr=98500000, run size=0100beb0 bytes, compression=zero_init
.tracebuf: load addr=99578f3c, load size=00000008 bytes, run addr=9f000000, run size=00008004 bytes, compression=zero_init
==========================================================
rsc_table_vayu_dsp.c文件修改如下:
/* DSP Memory Map */
#define L2_RAM_BASE 0x40800000
#define DSP_L2_RAM_BASE 0x40800000
#define DSP_L2_RAM_SIZE 0x48000
#define L1D_RAM_BASE 0x40f00000
#define DSP_L1D_RAM_BASE 0x40f00000
#define DSP_L1D_RAM_SIZE 0x4000
#define L1P_RAM_BASE 0x40e00000
#define DSP_L1P_RAM_BASE 0x40e00000
#define DSP_L1P_RAM_SIZE 0x4000
struct my_resource_table ti_ipc_remoteproc_ResourceTable增加以下2项
{//L1D
TYPE_DEVMEM,
DSP_L1D_RAM_BASE, DSP_L1D_RAM_BASE,
DSP_L1D_RAM_SIZE, 0, 0, "DSP_L1D_RAM_BASE",
},
{//L1P
TYPE_DEVMEM,
L1P_RAM_BASE, DSP_L1P_RAM_BASE,
DSP_L1P_RAM_SIZE, 0, 0, "DSP_L1P_RAM_BASE",
},
请问是哪里出现了问题,是少修改文件还是其他地方设置有误?