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.

SK-AM62: Backup Boot Flow Questions

Part Number: SK-AM62

Dear Experts,

I'm looking to get some more information or references regarding the AM62x's ability to boot to a backup source. In the TRM I see Figure 5-3 and some text that describes generally that if the tiboot3.bin file does not pass an image integrity check. I was wondering if I could get some more information regarding what happens in that image integrity check that is not described below this figure that I'll copy in this case:

The following system conditions must be met at POR to perform device boot:
•USB cable plug must be inserted
•Ethernet PHY is powered up and out of reset
•The SD card cage must be powered before entering the SD card boot mode. A SD/MMC card with pre-loaded image must be inserted
•Memory devices must be up and ready (power ramped up and reset completed) at device startup:
    –eMMC
    –xSPI/OSPI/QSPI/SPI and Serial flash
    –I2C EEPROM
    –NOR/NAND flashFailing to meet these

If all of the system conditions are met, and the TI ROM firmware looks to load tiboot3.bin, what conditions must be met in order to continue down the tree in Figure 5-3 and continue booting from the primary boot source? What are the conditions that must be satisfied so the image integrity check on the tiboot3.bin passes?

If tiboot3.bin does load off of the primary boot, but there is an issue with tispl.bin and we switch to the backup boot media, will TI SYSFW that was loaded from tiboot3.bin be backwards compatible with a version of tispl.bin and u-boot.img that was built with an older version of TI SYSFW?

Thank you for your help.

From,

Daniel Fettke

  • Hello,

    1. I believe there is no documentation on how ROM authenticates the initial binary. But there is an x509 certificate attached to tiboot3.bin that ROM will read. This x509 certificate will have information like hashes to verify the integrity of all the components in tiboot3.bin.

    2. The conditions depend on what boot mode you will be using. What is your desired boot mode?

    3. Once tiboot3.bin executes, we do not have to worry about ROM, R5 SPL will be responsible for loading the next stage bootloader. If there is an issue with tispl.bin, it is up to R5 SPL to handle the issue. The backup boot media is only for ROM. ROM does leave information for R5 SPL to know what bootmode to use, but the logic of choosing between primary boot mode and secondary boot mode is up to ROM. At R5 SPL, if tispl.bin fails, I believe R5 SPL will simply hang.
    We cannot guarantee mixing versions will work since we have not tested all possible cases. It would be safer to use the version of SYSFW that comes with a specific processor SDK, we know for sure that should have been tested in the test farm.

    regards,

    Judith

  • Dear Judith,

    Thank you for your reply.

    1) Thanks for explaining that there is no documentation about how the ROM checks tiboot3.bin.

    2) Our boot mode is using eMMC with UDA as the primary, with SPI as the backup. I have another E2E case about this that I haven't seen a response to as I'm having trouble getting the backup boot to start here: SK-AM62: AM62x - Backup Boot with SPI - Processors forum - Processors - TI E2E support forums

    3) Thanks for explaining that there's no guarantee that SYSFW will be backwards compatible with earlier versions, and how stock U-Boot will hang or not be able to proceed further in the boot process.

    From,

    Daniel Fettke

  • Dear Judith,

    One other question, how does the TI ROM code handle CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX? From the mach-k3 Kconfig file I see this config address variable is the:

    "Address at which ROM stores the value which determines if SPL is booted up by primary boot media or secondary boot media."

    I'm curious if the value stored at this address is set by the ROM code when it picks which tiboot3.bin to boot from? I'm modifying U-Boot code so if tispl.bin doesn't load from the primary boot media then it goes to the backup. Changing the value pointed to by this address would help determine where to load u-boot.img from. Is it possible for U-Boot code to notify the ROM it's changing the boot media? Or should U-Boot write to the CPU_V7R and ARM64 addresses directly? 

    Thanks!

    From,

    Daniel Fettke

  • Hello Dan,

    I am looking in the K3_BOOT_PARAM table, please allow a day or so to get back to you.

    regards,
    Judith

  • Hello Dan,
    As Judith pointed out earlier, ROM is responsible to load the very first user bootloader, i.e. R5-BL running on R5 core from the boot media configured by BOOTMODE pins. Chapter 5 Initialization in TRM includes more details on how ROM loading R5-BL.
    We have an FAQ to compliment some details on redundant/recovery boot by ROM when loading R5-BL from "memory" boot media
    [FAQ] AM64x/AM62x SoC redundant/recovery boot support in ROM booting R5 bootloader
    e2e.ti.com/.../faq-am64x-am62x-soc-redundant-recovery-boot-support-in-rom-booting-r5-bootloader

    Once R5-BL is loaded successfully by ROM, and starts to run on R5, it is up to R5-BL to select from where to read the next stage SW. For example, by default in u-boot/Linux SDK, R5-BL or R5-SPL loads the next stage SW, i.e. tispl.bin from the same boot media as configured by BOOTMODE pins, and so on tispl.bin (A53-SPL) loads u-boot.img also from the same boot media. The following FAQ is on how to customize eMMC and OSPI flash layout for R5-SPL loading A53 SPL/u-boot
    e2e.ti.com/.../faq-am62x-how-to-customize-emmc-and-ospi-flash-layout-for-spl-u-boot-booting-with-ti-am62x-linux-sdk

    With what being said above that by default in u-boot/Linux SDK, R5-SPL loads the next stage SW, A53-SPL from the same boot media configured by BOOTMODE pins. But it is absolutely customisable by user to modify u-boot code to specify from which boot media for R5-SPL to load the next stage tispl.bin as necessary per system design and user case.

    Hopefully the info are helpful, and let us know any follow-up questions.
    Best,
    -Hong

  • Dear Hong,

    Thanks for that background into the boot flow. My remaining question for this case involves how or if CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX is set by the TI ROM code? From the mach-k3 Kconfig file I see this config address variable is the:

    "Address at which ROM stores the value which determines if SPL is booted up by primary boot media or secondary boot media."

    Is is also possible for U-Boot code to notify the ROM that it wants to change the boot media from primary to secondary if tispl.bin cannot be loaded by U-Boot? Or should U-Boot write to the CPU_V7R and ARM64 addresses directly? Thanks.

    From,

    Daniel Fettke

  • Hello Dan,
    As noted in my last reply:
    1/. "ROM is responsible to load the very first user booloader, i.e. R5-BL running on R5 core from the boot media configured by BOOTMODE pins",where R5-BL might be read and loaded by ROM from primary boot media or secondary boot media.
    2/. "Once R5-BL is loaded successfully by ROM, and starts to run on R5, it is up to R5-BL to select from where to read the next stage SW."

    I'd recommend close this e2e, and continue our discussions in the other re lated e2e.
    e2e.ti.com/.../sk-am62-am62x---backup-boot-with-spi
    Best,
    -Hong