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.

6678单镜像程序0核加载不了其他核的程序

Other Parts Discussed in Thread: SYSBIOS

用6678写了一个单镜像程序,用仿真器调试每个核都可以实现功能(0-3核每个核点亮evm板上一个灯),加载进去只有0核正常,只有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");
}

  • 请用仿真器跟一下看core0是否有把core1的代码加载进来?
  • 您说的是加载之后用仿真器跟还是在仿真模式跟?
  • 加载之后用仿真器跟。
  • 您好!

    非常感谢你的答复,不过还是没有加载成功。

    首先,我用的是网口启动,程序是放在ddr3上的,启动后只有核心0的程序在执行。

    按照你说的,启动后再去看bootmagic地址是不可行的,因为设置成网口启动后仿真器连上evm板也没有用,仿真不了。

    麻烦您指点一下,我是带sysbios跑的,.tex是放在ddr上的,我看了cint00的地址是在ddr上的,只有一个镜像,所以8个核的bootmagic地址上是都应该加载这个cint00的地址,不知道我理解的对不对?,按照这种理解,我把加载代码修改成:

      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, 0);
            }
            else
            {
                 bootEntryAddr = *bootMagicAddr0;
            }
            *bootMagicAddr = bootEntryAddr;
            CSL_IPC_genGEMInterrupt(coreIndex, 0);
           }

    但是还是无法加载其他核的程序!!!

    请问是否和.tex段放的位置和cint00的位置有关系?

    ti是否有这种多核单镜像的例程工程,最好是带sysbios的?