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.

TMS320C6678: tms320c6678 rom bootloader RBL2.0 中启动多核 问题

Part Number: TMS320C6678


6678中 Rom Bootloader(RBL) 0核加载完程序和配置后,到底是如何启动其余7个核的,没有看懂。

下面是6678 RBL中nysh.c中的一段代码,代码中文注释处,启动1-7核心需要设置start_vector 变量。

/************************************************************************************
* FUNCTION PURPOSE: Start DSP cores
*************************************************************************************
* DESCRIPTION: Branches out of the boot loader. This function is only executed by
* core 0. Core 0 returns from this function for boot cleanup.
*************************************************************************************/
UINT16 chipStartCore (UINT32 start_addr, UINT32 magic_addr, UINT16 start_vector)
{
UINT32 i;
UINT32 core_start_addr;
UINT32 *p_magic = (UINT32 *)magic_addr;


for (i = chipReadNumCores() - 1; i > 0; i--) {

if ( (start_vector & (1 << i)) != 0) {//需要将start_vector高7位置1//nysh.c中的第668
core_start_addr = chipFormGlobal (i, (UINT32)&magicAddr);
*((UINT32 *)core_start_addr) = chipMapGlobalToLocal (start_addr);
DEVICE_REG_IPCGR(i) = 1; /* Wake the secondary core */
}

}

if ( (start_vector & 1) != 0 ) {


*p_magic = chipMapGlobalToLocal (start_addr);

i = 0;
do {

chipKickUnlock();
DEVICE_REG_BOOT_COMPLETE = 1; /* Set the bit for core 0 */
chipKickLock();
i += 1;

} while ((i < DEVICE_MAX_BC_RETRY) && ((DEVICE_REG_BOOT_COMPLETE & 1) == 0));

}

return (CHIP_NOERR);

} /* chipStartCore */

找遍整个RBL的代码对start_vector 进行赋值的只有两处,1处是btblpr.c中第462行中

p_btbl_inst->core_start_vector = 1; 

但是是赋值1不能启动1-7核

/*
* Set the core start vector to start core A only as its default value
* in case the boot table does not contain the setting of the core
* start vector.
*/
p_btbl_inst->core_start_vector = 1;

另一处是btblpr.c中第209行

/* record the core start vector */
p_inst->core_start_vector = data;

这行代码是条件编译代码

需要 define BOOTCONFIG_NO_BTBL_IO这个宏

才能编译

但是代码中没有看到这样的宏语句。

因此1-7核不能启动

-------------------------------------------------------------------------------------------------

请问:

1 官方能不能给一个完整的RBL代码,目前给的代码很多头文件缺失,阅读起来困难

2 迫切需要利用RBL完成ddrl,执行DDR leveling,因此迫切需要彻底了解RBL。

  • 下载 4.1.11 Where Can i Find the ROM Bootloader (RBL) Sources?

    https://www.ti.com.cn/cn/lit/an/spracn2/spracn2.pdf

    其它没有代码了。

    参考以下文档的描述,以3.12.4的启动模式为例,通常core0由RBL启动,core0通过ipc唤醒其它核

    Once the RBL has initialized the DDR controller and loaded the application successfully, the RBL running in CorePac0 will modify the program counter of CorePac0 to the start of the application and start executing the application. CorePac0 will, in turn, run the portion of the code to be run only for CorePac0 and set the boot magic address on the secondary CorePacs and then wake up the secondary CorePacs by setting the IPC interrupts for the other CorePacs.

    www.ti.com/.../sprugy5c.pdf