Hi,
I'm trying to enable OSPI boot with SBL on our custom board but instead of
standard MCU-SW (can-boot-app) we are using custom MCU1_0 firmware
(which will boot other cores from OSPI flash just like MCU-SW does).
So basically this is quite similar to the SBL -> MCU-SW setup with the only
difference that MCU-SW is loaded to SRAM while our custom firmware running on MCU1_0 uses DDR.
However this does not work for us out of the box as BSS section is not zeroed during
loading of the binary. Unfortunatelly there is a piece of code related to SCI server/client
logic which assume static variables (which are located in BSS) are actually equal to zero on startup.
For example please see pdk_jacinto_07_03_00_29/packages/ti/drv/sciclient/src/rm_pm_hal/pm/drivers/psc/psc.c
and specifically psc_lookup function which assume 'static struct device *psc_devs' is initialized as zero.
BTW this seems to be not the only place where this assumption is applied as fixing it does not fix the issue completely.
If I got it right RPRC format, used to program OSPI flash, completely miss BSS section information when generated from ELF
so it looks like SBL does not even know for sure which memory region should be zeroed during firmware loading.
As a workaround I've updated SBL with the code to zero whole DDR used for MCUs firmware and now everything works just fine
but as we have quite some MCUs actually utilized we have to zero pretty much a lot of memory which is time consuming
(our MCU firmwatre similary to MCU-SW uses same firmware loading logic and RPRC format so while SBL only loads MCU1_0
it looks like we stil need to zero DDR for other cores like MCU2_0 and MCU3_0 to make sure it will work fine).
I'm wondering if I missed something and there is a way to properly handle BSS to
enable OSPI boot with SBL properly or this behaviour is expected and SBL should start code from SRAM only
(which I assume is zeroed at init due to HW specifics - isn't it?).
Thanks,
Andrey.