AM263P4-Q1: SBL Boot Time Profiling & Reduction Options

Part Number: AM263P4-Q1

Hello,

Our SBL is based on TI 'sbl_ospi_multicore_elf' but modified for Infineon S25FL128 QSPI chip running 1S-1S-4S protocol.  I measured the time from power on to application start on our custom HW with a scope and it is about 2.4s.

I profiled the SBL and it has the following numbers:

[Cortex_R5_0] 
 [HSM_CLIENT] New Client Registered with Client Id = 0
 
Starting OSPI Bootloader ...
KPI_DATA: [BOOTLOADER_PROFILE] CPU Clock : 400.000 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media : NOR SPI FLASH
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 133.333 MHz
KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size : 694 KB
KPI_DATA: [BOOTLOADER_PROFILE] Cores present :
r5f0-0
r5f1-0
r5f1-1
KPI_DATA: [BOOTLOADER PROFILE] System_init          : 773us
KPI_DATA: [BOOTLOADER PROFILE] Drivers_open         : 202us
KPI_DATA: [BOOTLOADER PROFILE] LoadHsmRtFw          : 10392us
KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen    : 505us
KPI_DATA: [BOOTLOADER PROFILE] CPU load             : 2471557us
KPI_DATA: [BOOTLOADER PROFILE] SBL End              : 30us
KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken : 2483462us

Image loading done, switching to application ...


The big hitter is 'CPU load' with 2.5s with HSM firmware a distant 2rd. My thinking is that even if I remove HSM in our HS-FS devices, I'm still left with variables I can do nothing about.

1) Are these figures in the right ball park you would expect for 'sbl_ospi_multicore_elf' or do you think I have a gross error somewhere?

2) I think I have two options, which of (a) or (b) below would you choose to get the biggest reduction in boot time?

    a) Tinker with flash protocol (e.g. 4S-4S-4S) and clock frequency.

    b) Abandon my current SBL and start again with 'sbl_ospi_fastboot' from SDK.

3) What purpose does the 'sbl_ospi_multicore_elf' example serve if 'sbl_ospi_fastboot' does the same only much faster?

 

Thank you.

  • Hi.

    1) Are these numbers from release or debug configuration.

    2) You can try Flash Protocol (4s4s4s), it should increase execution time

    3)

    sbl_ospi_fastboot (OSPI Fastboot)

    - HSM Runtime loaded from flash: Reads HSM RT image from flash dynamically
    - Faster boot: Skips LBIST (Lifetime Built-In Self-Test) and MBIST diagnostics
    - Simpler flow: Minimal overhead - goes straight to loading and executing the multicore ELF
    - Use case: Production/operational deployment where speed is critical

    sbl_ospi_multicore_elf (Multicore ELF)

    - HSM Runtime embedded: HSM RT image is compiled directly into the bootloader 
    - Built-in profiling: Includes Bootloader_profile* calls to measure boot timing 
    - LBIST/STC testing: Runs self-test diagnostics
    - Larger binary: Embedding HSM RT increases code size
    - Use case: Development/validation/diagnostics - for testing CPU self-checks and profiling boot performance



  • 1) The numbers are for Debug config with optimisation set to 'fast'.

    2) OK, thanks. I will try 4S-4S-4S first.

    3) Thank you, understood.

  • for 1) Try in release configuration.