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.

Need to know more about Secondary Program Loader (SPL) and it's significance with respect to "Keystone 66AK2E02" and "MCSDK"

Other Parts Discussed in Thread: 66AK2E05

Dear E2E,

I'm new to the "Keystone II" and need to know more about the SPL (Secondary Program Loader) and how it's working in Keystone 66AK2E02 / 66AK2E05.

I have a basic idea of booting process in which, boot ROM code will fetch the initialization parameters and u-boot based on the boot-switches. Once the external memory (RAM) has initialized, then the u-boot will copied into the RAM and then follow with uImage and file-system to complete the booting process.

I came across SPL from the following link:

http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring

But, the description of SPL is limited and I didn't get what exactly the SPL do. Could anyone help me to understand what exactly SPL is and also why we need to use this over normal booting?

Looking forward to your reply...

Thank you in advance,
Ajith P V

  • Hi Ajith,

    The first stage is loaded from the boot media specified by the boot switches using default bootROM parameter tables. The first stage code replaces the default fields in the boot parameter table and re-enters boot to load the second stage.

    This process is used in-order to modify the default boot process in cases where you need to speed up the boot speeds, boot from a different offset in the flash memory, load code into DDR memory or to perform time critical application specific initialization that may be required without waiting for the entire application to load.

    Thank you.
  • You can also refer the various boot examples available for K2X from below link,

    processors.wiki.ti.com/.../KeystoneII_Boot_Examples

    Thank you.
  • Hi Ajith,

    Ajith says said:
    But, the description of SPL is limited and I didn't get what exactly the SPL do. Could anyone help me to understand what exactly SPL is and also why we need to use this over normal booting?

    To facilitate two stage booting, SPL is used. In SPI boot mode, the RBL will load the SPL ( secondary program loader ) image first from the SPI NOR flash first and then load the U-BOOT from NOR or NAND.

    In other words, the first stage of u-boot binary is called as SPL image.

    [quote user="Ajith says"] But, the description of SPL is limited and I didn't get what exactly the SPL do. Could anyone help me to understand what exactly SPL is and also why we need to use this over normal booting? [/quote ]

    To facilitate two stage booting, SPL is used.

    The necessity for Multistage booting and its significance:-

     The RBL also provides a multi-stage boot mechanism. This feature can be used when a
    single stage boot does not provide the desired flexibility. An example of why a multi-stage boot may be desired is for SPI boot. When a defaultSPI boot is performed it does not program any of the device PLLs; they are left in bypass
    mode. When the ARM PLL is in bypass, theARM will be clocked by the input clock
    instead of the fast output of the PLL. This means that code download across the SPI
    interface will be slower than if the ARMwas running at full speed. Using a multi-stage
    boot, a very small program can be downloaded using the default SPI boot. When
    executed, this small program can modify the boot parameter table so that it directs the
    RBL to program the ARM PLL. After modifying the boot parameter table, the program
    simply branches to the boot re-entry location to perform a secondary SPI boot with thedevice now running at full speeed.

    Please revert if have any questions.

    Regards,

    Shankari

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

    Please click the Verify Answer button on this post if it answers your question.

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

  • Hi Rajasekaran and  Shankari,

    Thank you very much for your support and detailed explanation. I understood why we using SPL over the normal booting mechanism.

    I would like to know whether below configuration scenarios are possible with SPL or not.

    Scenario 1 : u-boot, uImage and file-system are stored in USB flash drive and RBL in SPI NOR.

    1) RBL will load the SPL ( secondary program loader ) image first from the SPI NOR .

    2) SPL will be then load u-boot which placed in USB flash drive.

    3) uImage and file-system then load from USB flash drive.

    Scenario 2 : RBL in SPI NOR, u-boot is in NAND, uImage and file-system are stored in USB flash drive.

    1) RBL will load the SPL ( secondary program loader ) image first from the SPI NOR .

    2) SPL will be then load u-boot which placed in NAND drive.

    3) uImage and file-system then load from USB flash drive.

    It would be really helpful if document/link are provided for the above configuration(s).

    Looking forward to your reply...

    Thank you in advance,

    Ajith P V