This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
目前AM5708 1G的DDR,只用ARM跟DSP1 。因大量机器常数数组和矩阵论算,DSP需要大量空间。DSP1程序CODE大于30M,DATA大于60M,HEAP大于20M。
DDR分给DSP1 500M空间,ARM 500M空间,其他IPU不用。如何分配设备树,IPC,CMEM等???
感谢您的回复,还有下面个问题请教。
(1)因只用ARM和DSP1。设备树 reserved-memory中DSP2、IPU1和IPU2 设置为disabled,然后重新编译设备树启动后不能启动linux内核。是内核也要配置吗?
修改如下,其他未动:
ipu2_cma_pool: ipu2_cma@95800000 {
compatible = "shared-dma-pool";
reg = <0x0 0x95800000 0x0 0x3800000>;
reusable;
status = "disabled";
};
dsp1_cma_pool: dsp1_cma@99000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x99000000 0x0 0x4000000>;
reusable;
status = "okay";
};
ipu1_cma_pool: ipu1_cma@9d000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x9d000000 0x0 0x2000000>;
reusable;
status = "disabled";
};
dsp2_cma_pool: dsp2_cma@9f000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x9f000000 0x0 0x800000>;
reusable;
status = "disabled";
};
(2)设备树 reserved-memory定义了dsp1 cma地址0x99000000,大小0x4000000。
dsp1_cma_pool: dsp1_cma@99000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x99000000 0x0 0x4000000>;
reusable;
测试代码ex02_messageq中 rsc_table_dsp1.h 中 DSP_MEM_TEXT为什么从 0x95000000开始,
不应该是从cma的地址0x99000000开始分配吗?
#define DSP_MEM_TEXT 0x95000000
/* Co-locate alongside TILER region for easier flushing */
#define DSP_MEM_IOBUFS 0x80000000
#define DSP_MEM_DATA 0x95100000
#define DSP_MEM_HEAP 0x95200000
#define DSP_MEM_IPC_VRING_SIZE SZ_1M
#define DSP_MEM_IPC_DATA_SIZE SZ_1M
#define DSP_MEM_TEXT_SIZE SZ_1M
#define DSP_MEM_DATA_SIZE SZ_1M
#define DSP_MEM_HEAP_SIZE (SZ_1M * 3)
我希望扩展 DSP_MEM_TEXT_SIZE 到 (SZ_1M * 64) ,
DSP_MEM_DATA_SIZE (SZ_1M * 128), DSP_MEM_HEAP_SIZE (SZ_1M * 32)。
那么起始地址还是 0x95000000? dsp1 cma地址0x99000000是否要延后到0x99000000+0xE00 0000= 0xA700 0000?
(0xE00 0000为64M+128M+32M=224M)
感谢回复,是不是可以这样认为:CMA pool定义了可连续使用的内存大小,0x99000000是物理地址。DSP_MEM_TEXT 与config.bld中都是虚拟地址,只要定义相匹配,可以随意在0x80000000~0xc0000000(1G DDR)分配?