3.1.1.4. Bootflow

3.1.1.4.1. Boot Flow

Unlike with most other K3 SoCs the AM62LX does not have an Cortext-R5 MCU core which ROM uses to initialize the SoC therefore uses a 2 phase ROM boot. The first phase will load the tiboot3.bin image which contains Trusted-Firmware-A’s BL-1 loader along with the typical X.509 certificate to authenticate and validate the image which is used to intialize the console and DDR for the next phase.

┌───────────────────┐┌───────────────────┐
│    Secure ROM     ││    Public ROM     │
│     SMS (M4)      ││   (Cortex-A53)    │
│                   ││                   │
│┌─────────────────┐││                   │
││  Reset Release  │││                   │
│└────────┬────────┘││                   │
│         │         ││                   │
│┌────────▼────────┐││                   │
││    ROM Init     │││                   │
│└────────┬────────┘││                   │
│         │         ││                   │
│┌────────▼────────┐││┌─────────────────┐│
││   Release A53   ┼┼┼►   Release A53   ││
│└─────────────────┘││└────────┬────────┘│
│                   ││         │         │
│  Validate Image   ││┌────────▼────────┐│
│┌─────────────────┐│││    ROM Init     ││
││ Integrity Check ◄┼┼┼   (1st Phase)   ││
│├─────────────────│││└────────┬────────┘│
││ Authentication  │││         │         │
│├─────────────────┤││┌────────▼────────┐│
││    Decryption   ││││       WFI       ││
│└────────┬────────┘││└─────────────────┘│
│         │         ││                   │
│┌────────▼────────┐││    End of ROM     │
││  Wait for WFI   │││~~~~~~~~~~~~~~~~~~~│
││  on Cortex-A53  │││     Start of      │
│└────────┬────────┘││       BL-1        │
│         │         ││                   │
│┌────────▼────────┐││┌─────────────────┐│
││    Start BL-1   ┼┼┼►    DDR Init     ││
│└────────┬────────┘││└────────┬────────┘│
│         │         ││         │         │
│┌────────▼────────┐││┌────────▼────────┐│
││  Wait for BL-1  ◄┼┼┼  Send BL-1 Done ││
││     Done Msg    │││└────────┬────────┘│
│└─────────────────┘││         │         │
│                   ││┌────────▼────────┐│
│                   │││       WFI       ││
│                   ││└─────────────────┘│
└───────────────────┘└───────────────────┘

After the BL-1 sends a message back to the Secure ROM to indicate it has completed, the Secure ROM will reset the A53 back into Public ROM to begin the 2nd ROM boot phase to load the tispl.bin into the SoC.

┌───────────────────┐┌───────────────────┐
│    Secure ROM     ││    Public ROM     │
│     SMS (M4)      ││   (Cortex-A53)    │
│                   ││                   │
│┌─────────────────┐││                   │
││  Program Reset  │││┌─────────────────┐│
││   Vector And    ┼┼┼►   Release A53   ││
││    Reset A53    │││└────────┬────────┘│
│└─────────────────┘││         │         │
│                   ││         │         │
│   Validate Image  ││┌────────▼────────┐│
│┌─────────────────┐│││    ROM Init     ││
││ Integrity Check ◄┼┼┼   (2nd Phase)   ││
│├─────────────────┤││└────────┬────────┘│
││ Authentication  │││         │         │
│├─────────────────┤││┌────────▼────────┐│
││   Decryption    ││││       WFI       ││
│└────────┬────────┘││└─────────────────┘│
│         │         ││                   │
│┌────────▼────────┐││     End of ROM    │
││  Wait for WFI   │││~~~~~~~~~~~~~~~~~~~│
││  on Cortex-A53  │││                   │
│└────────┬────────┘││                   │
│         │         ││                   │
│┌────────▼────────┐││                   │
││  Program Reset  │││┌─────────────────┐│
││   Vector And    ┼┼┼►   TF-A (BL-31)  ││
││    Reset A53    │││└────────┬────────┘│
│└────────┬────────┘││         │         │
│         │         ││┌────────▼────────┐│
│┌────────▼────────┐│││    U-Boot SPL   ││
││  Prep M4 Reset  │││└────────┬────────┘│
│└────────┬────────┘││         │         │
│         │         ││┌────────▼────────┐│
│┌────────▼────────┐│││     U-Boot      ││
││    Boot TI-FS   │││└────────┬────────┘│
│└────────┬────────┘││         │         │
│         │         ││         │         │
│     End of ROM    ││         │         │
│~~~~~~~~~~~~~~~~~~~││         │         │
│         │         ││┌────────▼────────┐│
│┌────────▼────────┐│││                 ││
││                 ││││                 ││
││      TI-FS      ││││      Linux      ││
└┴─────────────────┴┘└┴─────────────────┴┘

From there TIFS, TF-A and U-Boot will has completed their initialization routines which can begin loading the operating system and complete the boot process.