开发平台:DVEVM 1.2/DVSDK 1.2/SEED DM6446开发板
DM6446评估板带有256MB内存,分为7个Segment,Default Memory Map如下:
以表格方式表述的DM644x Default Memory Map(参见/codec_engine_1_10_01/docs/sprue67b.pdf)
以图形方式表述的DM644x Default Memory Map
1. Linux
供ARM使用的内存,由ARM Linux管理使用,应用程序无法直接访问这些内存。
用Windows超级终端通过串口向开发板设置启动参数bootargs时指定,例如:
# setenv bootargs console=ttvS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=$(nfshost):$(rootpath),nolock mem=120M
2. CMEM : Contiguous Memory Allocator
CMEM是一个连续物理存储空间分配模块,使得ARM端Linux进程和DSP端算法之间能够共享缓冲区。当应用程序需要在共享缓存区动态申请一个连续的物理空间时,通过调用CMEM的API可以实现,申请得到的空间可以供DSP端访问,进行算法处理时数据的传递与处理。
使用insmod命令安装cmemk.ko驱动模块时指定CMEM起止物理地址,例如:
insmod cmemk.ko phys_start=0x87800000 phys_end=0x88000000 pools=20x4096,10x131072,2x1048576
insmod cmemk.ko phys_start=0x87800000 phys_end=0x88000000 pools=20x4096,10x131072,2x1048576
参见/codec_engine_1_10_01/examples/apps/system_files/davinci/loadmodules.sh。
3、DDRALGHEAP、DDR、DSPLINKMEM、CTRLRESET
这些段均在DSP server源代码中的*.tcf文件中指定。
view plaincopy to clipboardprint?
01./*
02. * Setup platform-specific memory map:
03. */
04.var mem_ext = [
05.{
06. comment: "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
07. name: "DDRALGHEAP",
08. base: 0x88000000, // 128MB
09. len: 0x07A00000, // 122MB
10. space: "code/data"
11.},
12.{
13. comment: "DDR: off-chip memory for application code and data",
14. name: "DDR",
15. base: 0x8FA00000, // 250MB
16. len: 0x00400000, // 4MB
17. space: "code/data"
18.},
19.{
20. comment: "DSPLINK: off-chip memory reserved for DSPLINK code and data",
21. name: "DSPLINKMEM",
22. base: 0x8FE00000, // 254MB
23. len: 0x00100000, // 1MB
24. space: "code/data"
25.},
26.{
27. comment: "RESET_VECTOR: off-chip memory for the reset vector table",
28. name: "RESET_VECTOR",
29. base: 0x8FF00000,
30. len: 0x00000080,
31. space: "code/data"
32.},
33.];
/*
* Setup platform-specific memory map:
*/
var mem_ext = [
{
comment: "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
name: "DDRALGHEAP",
base: 0x88000000, // 128MB
len: 0x07A00000, // 122MB
space: "code/data"
},
{
comment: "DDR: off-chip memory for application code and data",
name: "DDR",
base: 0x8FA00000, // 250MB
len: 0x00400000, // 4MB
space: "code/data"
},
{
comment: "DSPLINK: off-chip memory reserved for DSPLINK code and data",
name: "DSPLINKMEM",
base: 0x8FE00000, // 254MB
len: 0x00100000, // 1MB
space: "code/data"
},
{
comment: "RESET_VECTOR: off-chip memory for the reset vector table",
name: "RESET_VECTOR",
base: 0x8FF00000,
len: 0x00000080,
space: "code/data"
},
];
参见/codec_engine_1_10_01/examples/servers/all_codecs/all.tcf。(在*.tcf文件中也管理了L1&L2 Cache的分配。)
当需要修改DSP Link Memory Map时,DSP Link v1.3(v1.4及以上版本不需要重新编译)需要修改/dsplink_1_30_08_02/packages/dsplink/config/all/CFG_Davinci.TXT文件并重新编译DSP Link,然后修改DSP server的*.tcf文件并重新编译DSP server。
附TI网站的相关链接: