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。