如标题所说,我将两个sysbios程序固化到SPI内,但是主核无法让从核启动
目前已知:
1.我的两个程序代码段都会放到DDR中,调试也能看到。
2.程序都放到L2就没问题。
3.DDR table运行正常,即主核是可以正常启动并且输出消息的。
4.用的例程中的启动代码
想问:
1.我当前的代码如何?
2.platform中是否有对应的函数让从核也启动?
以下是我的主核启动从核的代码(DDR每个核心偏移0x00200000):
void MulticoreBoot()
{
int *pBootMagicAddCore0;
int *pBootMagicAddCore0DDR;
int *IpcGr0;
platform_init_flags sFlags;
platform_init_config sConfig;
int i;
int pform_status;
int coreId = 0;
// coreId = platform_get_coreid ();
coreId = CSL_chipReadReg (CSL_CHIP_DNUM);
if(coreId == 0)
{
/*write Boot Magic add of other cores and send IPC interrupt*/
pBootMagicAddCore0 = (int*)0x1087FFFC;
pBootMagicAddCore0DDR = (int*)0x80000000; /*code start*/
(*pBootMagicAddCore0)+= 0x10000000;// translate to global address
for(i = 1;i < CORE_NUM_6678; i++)//write the other cores' boot magic address
{
*(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0DDR) + 0x00200000 * i;
}
IpcGr0 = (int*)0x02620240;
/*warning:when running on no-boot mode,core0~core7 must all be connected to the target*/
for(i = 1;i < CORE_NUM_6678;i++)//core0 sent ipc interrupt to
{
*(IpcGr0+i) = (*(IpcGr0+i)) | 0x00000001;
}
}
else
{
}
}
你好Taylor:
排除了一些基本问题后,我认为是在跳转时的地址错误。
例程中的跳转地址设定为:
pBootMagicAddCore0 = (int*)0x1087FFFC;
(*pBootMagicAddCore0)+= 0x10000000;// translate to global address
*(pBootMagicAddCore0+ (0x01000000*i)/4 ) = (*pBootMagicAddCore0) + 0x01000000 * i;
从代码上看此地址进行了一次映射(// translate to global address),如我所理解,在映射后进行的( (*pBootMagicAddCore0) + 0x01000000 * i)操作,得到的是0x11800000上对吗?
那么我需要映射到0x80000000上的话需要注意什么呢,可否直接赋值0x80000000?