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.

AM62A7-Q1: Why is there so many Authentications during the boot process, and can I reduce the number of Authentications to improve the boot time?

Part Number: AM62A7-Q1

Why is there so many Authentications during the boot process, and can I reduce the number of Authentications to improve the boot time?

The boot log is as follows:

U-Boot SPL 2023.04-g4ad0bf40-dirty (Apr 03 2024 - 00:17:44 -0700)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
am62a_init: board_init_f done
SPL initial stack usage: 17040 bytes
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Trying to boot from MMC1
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
NOTICE:  BL31: Built : 09:34:15, Aug 24 2023

U-Boot SPL 2023.04-dirty (Mar 29 2024 - 10:23:57 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
am62a_init: board_init_f done
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Trying to boot from MMC1
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed
am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
Authentication passed


U-Boot 2023.04-g4ad0bf40-dirty (Apr 03 2024 - 00:17:38 -0700)

SoC:   AM62AX SR1.0 HS-FS
Model: Texas Instruments AM62A7 SK
DRAM:  2 GiB (effective 4 GiB)
Core:  58 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from MMC... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
19974656 bytes read in 131 ms (145.4 MiB/s)
51387 bytes read in 22 ms (2.2 MiB/s)
Working FDT set to 88000000
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to 000000008fef0000, end 000000008fffffff ... OK
Working FDT set to 8fef0000

Starting kernel ...

  • Hi,

    The A53 SPL (tispl.bin) and A53 U-Boot (u-boot.img) are FIT images which different components in them. Each component is signed at the host. At run time, each component is authenticated before loading. That's why you see these many authentication checks.

    A53 SPL (tispl.bin)

    The A53 SPL FIT image is created with the following config: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/dts/k3-am62a-sk-binman.dtsi?id=b0d717b732ee28e446baf94522b3491e590f7fbb#n216

    This includes signed ATF, OPTEE, A53 SPL, DM, and DTB. Each of these component is authenticated at run time before loading.

    A53 U-Boot (u-boot.img)

    The A53 U-Boot FIT image is created with the following config: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/arch/arm/dts/k3-am62a-sk-binman.dtsi?id=b0d717b732ee28e446baf94522b3491e590f7fbb#n364

    This includes U-Boot binary and DTB. Each of these component is authenticated at run time before loading.

    Regards,

    Prashant

  • Hi,Prashant

    Authentication checks are causing the boot time to take too long. So  can I turn off some authentication checks? What should I do?

    Or is there another way to reduce the time to authentication checks?

    Regards,

    gangqiang

  • The boot log is as follows:

    ·······[0.000000 0.000000] 
    [0.000276 0.000276] U-Boot SPL 2023.04-g4ad0bf40-dirty (Mar 28 2024 - 19:17:33 -0700)
    [0.004827 0.004550] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [0.056899 0.052073] am62a_init: board_init_f done
    [0.059284 0.002385] SPL initial stack usage: 17040 bytes
    [0.063100 0.003816] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.069575 0.006475] Trying to boot from MMC1
    [0.576587 0.507012] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.582406 0.005819] Authentication passed
    [0.593301 0.010895] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.599524 0.006223] Authentication passed
    [0.607265 0.007741] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.613235 0.005970] Authentication passed
    [0.659851 0.046616] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.667841 0.007990] Authentication passed
    [0.671415 0.003574] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.677467 0.006052] Authentication passed
    [0.693923 0.016456] Starting ATF on ARM64 core...
    [0.697912 0.003989] 
    [0.698015 0.000104] NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    [0.703209 0.005193] NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    [0.855398 0.152189] 
    [0.855814 0.000417] U-Boot SPL 2023.04-dirty (Mar 29 2024 - 10:23:57 +0800)
    [0.859951 0.004136] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    [0.866963 0.007012] am62a_init: board_init_f done
    [0.869651 0.002688] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [0.876128 0.006477] Trying to boot from MMC1
    [1.008748 0.132620] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [1.014214 0.005466] Authentication passed
    [1.639498 0.625283] am62a_init: spl_boot_device: devstat = 0x4b bootmedia = 0x9 bootindex = 0
    [1.646000 0.006503] Authentication passed
    [2.353033 0.707032] 
    [2.353522 0.000490] 
    [2.353603 0.000080] U-Boot 2023.04-g4ad0bf40-dirty (Mar 28 2024 - 19:17:28 -0700)
    [2.359774 0.006171] 
    [2.359885 0.000110] SoC:   AM62AX SR1.0 HS-FS
    [2.363874 0.003990] Model: Texas Instruments AM62A7 SK
    [2.364471 0.000597] DRAM:  2 GiB (effective 4 GiB)
    [2.641799 0.277328] Core:  58 devices, 28 uclasses, devicetree: separate
    [2.646383 0.004584] MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    [2.655421 0.009039] Loading Environment from MMC... OK
    [2.750122 0.094700] In:    serial@2800000
    [2.751599 0.001477] Out:   serial@2800000
    [2.753502 0.001903] Err:   serial@2800000
    [2.758575 0.005073] Net:   eth0: ethernet@8000000port@1
    [2.766715 0.008140] Hit any key to stop autoboot:  0 
    [2.903259 0.136544] 19974656 bytes read in 131 ms (145.4 MiB/s)
    [2.930170 0.026911] 51387 bytes read in 21 ms (2.3 MiB/s)
    [2.933882 0.003712] Working FDT set to 88000000
    [2.936420 0.002539] ## Flattened Device Tree blob at 88000000
    [2.940394 0.003974]    Booting using the fdt blob at 0x88000000
    [2.947414 0.007020] Working FDT set to 88000000
    [2.973331 0.025917]    Loading Device Tree to 000000008fef0000, end 000000008fffffff ... OK
    [2.982185 0.008854] Working FDT set to 8fef0000
    [2.988991 0.006806] 
    [2.989515 0.000524] Starting kernel ...
    [2.989939 0.000423] 
    [3.006347 0.016408] [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

  • Hi,

    If your development uses U-Boot just as a bootloader for Linux Kernel, we recommed using Falcon boot to improve boot time

    (+) [FAQ] AM625: How to boot from R5 U-Boot SPL directly into the Linux Kernel, skipping A53 SPL and A53 U-Boot (Falcon Mode) - Processors forum - Processors - TI E2E support forums

    You may also find the Linux SBLs from MCU+ SDK interesting: AM62x MCU+ SDK: SBL OSPI Linux Multistage

    Regards,

    Prashant

  • Hi Prashant,

    We tried Falcon mode, but it didn't meet our requirements. First of all, there are OTA requirements in our project. In Falcon mode, whether OTA can be realized still needs to be verified. Second, in our tests, Falcon mode did not improve the startup time significantly.

    So we tried to optimize in normal startup mode. In the normal mode, could you please give me a little more advice to achieve my purpose?

    Regards,

    Gangqiang

  • Hi,

    In Falcon mode, whether OTA can be realized still needs to be verified.

    The Falcon boot doesn't change anything. The primary purpose of Falcon boot is to remove the A53 SPL and A53 U-Boot from the boot flow. You can still use Falcon boot to boot your already existing rootfs supposedly with OTA capabilities.

    In the normal boot flow, the authentication time will be there. You will have to look at other aspects to achieve improved boot time.

    Regards,

    Prashant

  • Hi Prashant,

    We also have a requirement that we will start the MCU first, and then start the SOC, and using falcon mode will not affect it? If it does not affect, we will try to use falcon to fulfill our requirements.

    Regards,

    Gangqiang

  • Hi,

    We also have a requirement that we will start the MCU first, and then start the SOC, and using falcon mode will not affect it?

    In the normal boot flow, the MCU firmware is only booted by the Linux Remoteproc driver. How are you achieving the early booting of MCU with the existing boot flow?

  • Hi Prashant,

    I follow this document:

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM62AX/09_01_00_39/exports/docs/api_guide_am62ax/GETTING_STARTED_FLASH.html

    To enable the MCU to start first. Is that right?

    Regards,

    Gangqiang

  • Hi,

    To enable the MCU to start first. Is that right?

    But, this is when you use the MCU+ SDK boot flow which I believe you are not using at the moment. If you happen to use MCU+ SDK boot flow then yes the MCU is first started before booting Linux.

    Regards,

    Prashant

  • Hi Prashant,

    We will later boot flow based on MCU+SDK. On this basis, there is also a problem that authentication checks cause a long time. Is there a way to improve boot time in this mode? This need is very important to us.

    Regards,

    Gangqiang

  • Hi,

    If you are okay with booting unauthenticated images, then you can simply disable the authentication.

    Regards,

    Prashant 

  • Hi Prashant,

    How to simply disable the authentication?

    Regards,

    Gangqiang

  • Hi,

    You can boot the unsigned images.

    ~/ti/psdk/am62a/09.01.00.07/board-support/ti-u-boot-2023.04+gitAUTOINC+b0d717b732-gb0d717b732
    ❯ /usr/bin/ls -l build/a53/tispl.bin_unsigned build/a53/u-boot.img_unsigned
    -rw-r--r-- 1 p-shivhare p-shivhare 1326083 Apr 18 10:09 build/a53/tispl.bin_unsigned
    -rw-r--r-- 1 p-shivhare p-shivhare 1100811 Apr 18 10:09 build/a53/u-boot.img_unsigned
    

    U-Boot SPL 2023.04-00001-gacb65f69a1 (Apr 18 2024 - 10:09:09 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    am62a_init: board_init_f done
    SPL initial stack usage: 17040 bytes
    am62a_init: spl_boot_device: devstat = 0x53 bootmedia = 0xa bootindex = 0
    Trying to boot from DFU
    #################################################################DOWNLOAD ... OK
    Ctrl+C to exit ...
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Loading Environment from nowhere... OK
    am62a_init: spl_boot_device: devstat = 0x53 bootmedia = 0xa bootindex = 0
    am62a_init: spl_boot_device: devstat = 0x53 bootmedia = 0xa bootindex = 0
    init_env from device 10 not supported!
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    
    U-Boot SPL 2023.04-00001-gacb65f69a1 (Apr 18 2024 - 10:09:06 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    am62a_init: board_init_f done
    am62a_init: spl_boot_device: devstat = 0x53 bootmedia = 0xa bootindex = 0
    Trying to boot from DFU
    #####DOWNLOAD ... OK
    Ctrl+C to exit ...
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    
    
    U-Boot 2023.04-00001-gacb65f69a1 (Apr 18 2024 - 10:09:06 +0530)
    
    SoC:   AM62AX SR1.0 HS-FS
    Model: Texas Instruments AM62A7 SK
    DRAM:  2 GiB (effective 4 GiB)
    Core:  58 devices, 28 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    => 

    Regards,

    Prashant

  • Hi Prashant,

    Thanks for your support, I tried to disable the authentication successfully.

    Regards,

    Gangqiang