Part Number: AM6442
Hello, I am currently running into an issue with ospi multi-partitioned booting. My application is utilizing all the cores and these are the files I am flashing with the correct offsets:
r5fss0-0.mcelf.hs_fs
r5fss0-1.mcelf.hs_fs
r5fss1-0.mcelf.hs_fs
r5fss1-1.mcelf.hs_fs
m4.mcelf.hs_fs
a53ss0-0.mcelf.hs_fs
a53ss0-1.mcelf.hs_fs
All the cores in my application are self initializing during boot. I modified the example 'sbl_opsi_multi_partition' to include the a53ss0-1, set the correct offset according to my cores applications' sizes and changed the code for how R5FSS0-0 cores are loaded and booted.
The original setup has them in this manner:
if(SystemP_SUCCESS == status)
{
status = App_bootLoadSelfCpu( CONFIG_BOOTLOADER_FLASH_R5FSS0_0, CSL_CORE_ID_R5FSS0_0 );
}
if(SystemP_SUCCESS == status)
{
status = App_bootLoadSelfCpu( CONFIG_BOOTLOADER_FLASH_R5FSS0_1, CSL_CORE_ID_R5FSS0_1 );
}
I changed it to be in this manner:
if(SystemP_SUCCESS == status)
{
status = App_bootCpu( CONFIG_BOOTLOADER_FLASH_R5FSS0_0, CSL_CORE_ID_R5FSS0_0 );
}
if(SystemP_SUCCESS == status)
{
status = App_bootCpu( CONFIG_BOOTLOADER_FLASH_R5FSS0_1, CSL_CORE_ID_R5FSS0_1 );
}
The reason is that I need the applications on those cores to be running and the App_BootCpu() function is responsible to load and run CPUs. Although, the function is designed for those "not in self CPU cluster" while the original function being called on them, App_bootLoadSelfCpu(), is made for "load but DONT run CPU in self CPU cluster, i.e R5FSS0-0".
From this I have these questions:
1. The error is cleary stemming from running the wrong function on the R5FSS0 cores, but why does App_bootCpu() can not work with them?
2. What is the signifance "self CPU cluster, i.e R5FSS0-0" in this context?
3. How to correctly have R5FSS0 cores loaded in and then booted? or does the App_bootLoadSelfCpu() already handle that?
App_bootLoadSelfCpu():
/* load but DONT run CPU in self CPU cluster, i.e R5FSS0-0 */
int32_t App_bootLoadSelfCpu(uint32_t bootDrvInstanceId, uint32_t cpuId)
{
int32_t status = SystemP_FAILURE;
Bootloader_BootImageInfo bootImageInfo;
Bootloader_Handle bootHandle;
Bootloader_Params bootParams;
Bootloader_Config *bootConfig;
Bootloader_Params_init(&bootParams);
Bootloader_BootImageInfo_init(&bootImageInfo);
bootHandle = Bootloader_open(bootDrvInstanceId, &bootParams);
bootConfig = (Bootloader_Config *)bootHandle;
bootConfig->scratchMemPtr = gAppimage;
if(bootHandle != NULL)
{
status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo);
if(status == SystemP_SUCCESS)
{
bootImageInfo.cpuInfo[cpuId].clkHz = Bootloader_socCpuGetClkDefault(cpuId);
status = Bootloader_loadSelfCpu( bootHandle, &bootImageInfo.cpuInfo[cpuId], FALSE);
}
Bootloader_close(bootHandle);
}
return status;
}
/* boot, i.e load and run CPUs not in self CPU cluster */
int32_t App_bootCpu(uint32_t bootDrvInstanceId, uint32_t cpuId)
{
int32_t status = SystemP_FAILURE;
Bootloader_BootImageInfo bootImageInfo;
Bootloader_Params bootParams;
Bootloader_Handle bootHandle;
Bootloader_Config *bootConfig;
Bootloader_Params_init(&bootParams);
Bootloader_BootImageInfo_init(&bootImageInfo);
bootHandle = Bootloader_open(bootDrvInstanceId, &bootParams);
bootConfig = (Bootloader_Config *)bootHandle;
bootConfig->scratchMemPtr = gAppimage;
if(bootHandle != NULL)
{
status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo);
if(status == SystemP_SUCCESS)
{
bootImageInfo.cpuInfo[cpuId].clkHz = Bootloader_socCpuGetClkDefault(cpuId);
status = Bootloader_bootCpu(bootHandle, &bootImageInfo.cpuInfo[cpuId]);
}
Bootloader_close(bootHandle);
}
return status;
}
