嵌入式开发者社区
标题:
6678单镜像程序0核加载不了其他核的程序
[打印本页]
作者:
lizhaoheng
时间:
2018-10-23 20:34
标题:
6678单镜像程序0核加载不了其他核的程序
用6678写了一个单镜像程序,用仿真器调试每个核都可以实现功能,加载进去只有0核正常,其他核没有跑起来,加载不了其他核的程序。
程序如下,大家帮忙看下什么原因:
#define BOOT_MAGIC_ADDRESS 0x87fffc
#define BOOT_ENTRY_ADDRESS 0x810000
#define IPC_INTERRUPT_CORE0 0x02620240
#define LOCAL_TO_GLOBAL_ADDR(addr,corenumber) (unsigned int)addr<0x1000000?\
(unsigned int)addr+(0x10000000+corenumber*0x1000000):\
(unsigned int)addr
ulCurrCoreNum = MultiProc_self();
/* 由0核加载各个核心的程序 */
if(ulCurrCoreNum == 0)
{
System_printf ("\n开始加载各核程序\n");
System_printf("core0 0x1087fffc: 0x%x\n",*(UInt32*)0x1087fffc);
CSL_BootCfgUnlockKicker();
/* 逐个核核加载程序 */
for(coreIndex = 1; coreIndex < 8; coreIndex++)
{
bootMagicAddr0 = (unsigned int *)(LOCAL_TO_GLOBAL_ADDR(BOOT_MAGIC_ADDRESS,0));
bootMagicAddr = (unsigned int *)(LOCAL_TO_GLOBAL_ADDR(BOOT_MAGIC_ADDRESS,coreIndex));
if(*bootMagicAddr0 < 0x1000000)
{
bootEntryAddr = LOCAL_TO_GLOBAL_ADDR(*bootMagicAddr0, coreIndex);
// bootEntryAddr = LOCAL_TO_GLOBAL_ADDR(*bootMagicAddr0, 0);
}
else
{
bootEntryAddr = *bootMagicAddr0 + coreIndex * 0x1000000;
// bootEntryAddr = *bootMagicAddr0;
}
*bootMagicAddr = bootEntryAddr;
CSL_IPC_genGEMInterrupt(coreIndex, 0);
}
CSL_BootCfgLockKicker();
System_printf ("\n各核程序加载完成\n");
}
作者:
tronlong-gxd
时间:
2018-10-24 08:34
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4