DM6467 memory map HOW-TO
来源:互联网 发布:淘宝网下载2016新版 编辑:程序博客网 时间:2024/06/05 07:30
1. First, you should calculate your memory map of your board. For example, we use 128M DDR2 memory, and our Address Range is as below(this step is very important):
Address Range Size Description
0x80000000 - 0x847FFFFF 72 MB Linux
0x84800000 - 0x867FFFFF 32 MB CMEM
0x86800000 - 0x877FFFFF 16 MB DDRALGHEAP
0x87800000 - 0x87EFFFFF 7 MB DDR2 (BIOS, Codecs, Applications)
0x87F00000 - 0x87F0007F 128B DSPLINK (RESET)
0x87F00080 - 0x87FFFFFF 1MB-128B DSPLINK (MEM)
From the Address Range, we know that the Linux use the 72M, so we should set the uboot’s parameter to 72M, as step 2.
2. Second, reboot the board, and set the bootargs like this:
setenv nfshost 192.168.0.111;setenv rootpath /home/colin/workdir/filesys;
setenv bootcmd 'dhcp;bootm';
setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.0.111:/home/colin/workdir/filesys,nolock mem=72M;
setenv serverip 192.168.0.111;
setenv bootfile uImage_6467_evm.dat;
3. Third, when the system is ready, we should execute the shell script: loadmodules.sh, but we should modify it first, like this:
# insert cmemk, tell it to occupy physical 64MB-104MB and create enough
# contiguous buffers for the worst case requirements of the demos.
insmod cmemk.ko phys_start=0x84800000 phys_end=0x86800000 pools=9x3133440,2x1434240,2x663552,10x60000
# insert dsplinkk, tell it that DSP's DDR is at physical 250MB-254MB
insmod dsplinkk.ko
# alter dma queue mapping for better visual performance
if [ -f mapdmaq-hd ]
then
./mapdmaq-hd
fi
# make /dev/dsplink
rm -f /dev/dsplink
mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
because in our digiplayer, we allocate 7 buffers for video and audio respectively, so 9x3133440 is for video decode, 10x60000 is for audio decode.
3133440 = 1920*(1080+8)*1.5, so the buffer is big enough for video with 1080i to decode.
4. Now, we should rebuild the decodeCombo.x64P, change directory to PlayerDepend, and find the directory servers/decode, modify the file decodeCombo.tcf:
var mem_ext = [
// will use for cmem: base: 0x84800000 (72MB offset), size: 0x2000000(32MB)
{
comment: "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
name: "DDRALGHEAP",
base: 0x86800000, // 104MB offset
len: 0x01000000, // 16MB
space: "code/data"
},
{
comment: "DDR2: off-chip memory for code and data",
name: "DDR2",
base: 0x87800000, // 120MB offset
len: 0x00700000, // 7MB size
space: "code/data"
},
{
comment: "RESET_VECTOR: off-chip memory for the reset vector table",
name: "RESET_VECTOR",
base: 0x87F00000, // 127MB
len: 0x00000080, // 128B
space: "code/data"
},
{
comment: "DSPLINK: off-chip memory for DSPLINK code and data",
name: "DSPLINKMEM",
base: 0x87F00080, // 127MB
len: 0x000FFF80, // 1M-128B
space: "code/data"
},
];
Attention: the memory map is calculated through step 1.
And then, recompile the decodeCombo.x64P using command make.
5. modify the Application *.cfg file, add the following lines:
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.armDspLinkConfig = {
memTable: [
["DDRALGHEAP", {addr: 0x86800000, size: 0x01000000, type: "other"}],
["DDR2", {addr: 0x87800000, size: 0x00700000, type: "main" }],
["RESET_VECTOR", {addr: 0x87F00000, size: 0x00000080, type: "reset"}],
["DSPLINKMEM", {addr: 0x87F00080, size: 0x000FFF80, type: "link" }],
],
};
Attention: this memory map is calculated by step 1, and you must be the same as decodeCombo.tcf.
6. Test:
1) ./loadmodules.sh
2) Copy the decodeCombo.x64P and application to the execution directory and run the application.
Good Luck!
7. Reference
1) http://wiki.davincidsp.com/index.php?title=Changing_the_DVEVM_memory_map
2) http://wiki.davincidsp.com/index.php/Codec_Engine_Examples_Memory_Map
3) Mastering the art of Memory Map Configuration for DaVinci-Based Systems, SPRAAQ6- DM6467 memory map HOW-TO
- DM6467 memory map HOW-TO
- How to troubleshoot memory problems
- how to debug memory-leak
- More ways to map memory
- How to use map (STL)?-
- How to Find A Memory Leak
- How to Fix Memory Leaks in Java
- how to view bitmaps from memory dump
- How to Clear Inactive Memory in Linux
- How to Profile Memory in Linux
- How-to: set yarn mapreduce memory properties
- How to increase MySQL memory limit?
- C++ shared memory leak, how to clear shared memory?
- How to map requests to Controllers
- How to use windbg to detect memory leak
- Why to use memory pool and how to implement it
- How to use umdh to check Windows memory leak
- Hibernate的事务处理机制
- DM6467之视频采集(Linux)下MMAP
- 黑马程序员--交通灯管理系统
- Android中资源文件assets和res下面raw文件的使用不同点
- LINQ简记(1):基本语法
- DM6467 memory map HOW-TO
- 运行chkdsk 修复 无法打开进行卷直接访问?
- 亿通高科以及王振洪
- Subpage or Secondary page ?
- 《UNIX网络编程》之旅-配置unp.h头文件环境
- poj1459多源点多汇点最大流
- New package not yet registered with the system. Waiting 3 seconds before next attempt.解决方案
- sdram布线及建立时间,保持时间的问题
- Struts2上传文件限制大小问题