我在DM6446平台下,使用DSPLINGK框架下,因为目前的DSP算法端软件较大,我就想修改DSPLINK的内存分配修改DDR,DSPLINKMEM,CMEM,以适应算法的堆栈要求。为此我从新修改了 CFG_Davinci.TXT 文件,关键代码修改如下:
RESUMEADDR | H | 0x84100020 # Resume address
RESETVECTOR | H | 0x84100000 # Reset Vector for the DSP
RESETCODESIZE | H | 0x80 # Size of code at DSP Reset Vector
ENTRY | N | 0 # Entry number
ABBR | S | DSPLINKMEM # Abbreviation of the table name
ADDRDSPVIRTUAL | H | 0x84000000 # DSP virtual address
ADDRPHYSICAL | H | 0x84000000 # Physical address
SIZE | H | 0x00100000 # Size of the memory region
ABBR | S | RESETCTRL # Abbreviation of the table name
ADDRDSPVIRTUAL | H | 0x84100000 # DSP virtual address
ADDRPHYSICAL | H | 0x84100000 # Physical address
SIZE | H | 0x00000080 # Size of the memory region
MAPINGPP | B | TRUE # Map in GPP address space?
ABBR | S | DDR # Abbreviation of the table name
ADDRDSPVIRTUAL | H | 0x84100080 # DSP virtual address
ADDRPHYSICAL | H | 0x84100080 # Physical address
SIZE | H | 0xBEFFF80 # Size of the memory region
MAPINGPP | B | TRUE # Map in GPP address space?
这样修该,从新编译得到了dsplinkk.ko文件,但是原来的dsplinkk.ko文件只有80多K,我重新编译的有180多K。对于DSP端的代码dsp/inc/DspBios/Davinic/dsplink-davinci-base.tci文件依照CFG_Davinci.TXT也做了相应修改,然后又从新编译了GPP执行文件和DSP执行文件,放入产品中执行终端打印如下会死机,终端打印如下:
rmmod: cmemk: No such file or directory
cmemk: module license '(c) Texas Instruments' taints kernel.
cmem initialized 1 pools between 0x83400000 and 0x84000000
starting pid 775, tty '/dev/tts/0': '/sbin/getty -L console 115200 vt100'
dsplinkk: no version for "struct_module" found: kernel tainted.
DDR_START 0x84100080 DDR_SIZE 0x0BEFFF80
DSP_Create
Entered PROC_Setup ()
Entered DRV_Initialize ()
drvObj [0x67928]
arg [0x0]
Leaving DRV_Initialize () status [0x8000]
Entered DRV_Invoke ()
drvObj [0x83a70]
可以看到终端在这里死机了,从代码来看是执行DSP代码的时候出现问题。我已开始以为是dsplink的驱动和内核不匹配,但是做了修改还是这个问题,我想问一下如果我想修改代码运行的DDR的大小,以适应DSP的算法的要求。是修改 CFG_Davinci.TXT 和DSP端的dsplink-davinci-base.tci就可以了吗,还要修改其他文件吗?为什么我修改了就是不行了,这个问题困扰我好长时间了。对于在DSPLINK模式下修改内存分配的这个问题,迫切希望和你们探讨。
|