工具/软件:Linux
尊敬的 Sitara 支持团队:
我使用的是 processor_sdk_rtos_am57xx_4_01_00_06和 ti-processor-sdk-linux-am57xx-evm-04.01.00。
我从 IPC_3_46_02_04/packages/ti/ipc/tests/bin/ti_platforms_evmDRA7XX_dsp1/gatempapp.xe66获得 DSP 固件。
A15 Linux 源代码如下:
IPC_3_46_02_04/linux/src/tests/GateMPApp.c
IPC_3_46_02_04/linux/src/tests/main_host.c
我还中止了 ti-mctd 进程。当我运行 Linux 应用程序时,出现以下错误:
root@am57xx-EVM:~#./GateMPApp.host
-->主要:
CMEM_init 成功
->Main_main:
->GateMPApp_create:
[10619.875233] CMEMK 错误:ioctl:分配大小为0x1000的堆缓冲区失败
CMEM 错误:分配堆:ioctl CMEM_IOCALLOCHEAP 失败:-1
[10619.887423] CMEMK 错误:get_phys:无法找到0x0的 PHY 地址
[10619.898947] CMEMK 错误:get_phys:get_user_pages()失败:-14
[10619.904892] CMEMK 错误:GETPHYS:无法将虚拟0x0转换为物理。
CMEM 错误:getPhys:无法获取物理地址0
GateMPApp_create:无法获取物理缓冲区地址
-- GateMPApp_create:
<-- Main_main:
<--主要:
我发现在 DSP 上运行的函数 ti_sdo_ipc_SharedRegion_clearReservedMemory 将清除堆内存。
但是 cmemk.c cmem 的驱动程序会将该块的下一个块地址和大小保存在堆存储器前面。
因此、当 DSP 固件加载时 、cmemk.c 中 heap_head->next 的空间将被清除、
和
curHeaderPhys = heap_head[bi]。next;
/*在空闲列表上循环。 *
while (curHeaderPhys!= 0){
map_header (((void **)&curHeader、curHeaderPhys、&curHeader_VM_Area);
curSize = curHeader-> Size;
curSize 将为0。这 会导致 alloc 失败。
如果我按照下面的方法运行应用程序,它将起作用。
重新加载 DSP 固件
rmmod cmemk.ko
insmod cmemk.ko
/GateMPApp.host
-->主要:
CMEM_init 成功
->Main_main:
->GateMPApp_create:
GateMPApp_create:主机已就绪
-- GateMPApp_create:
--> GateMPApp_exec:
GateMPApp_exec:使用主机创建的门
GateMPApp_exec:使用从器件创建的门
-- GateMPApp_exec:0
--> GateMPApp_DELETE:
<- GateMPApp_DELETE:
<-- Main_main:
<--主要:
我的代码是否有问题?