The boot code performs minimum configuration which is required for an application. Cortex-A53 starts by checking current exception level. If the current exception level is EL3 and BSP is built for EL3, it will do initialization required for application execution at EL3. Below is a sequence illustrating what all configuration is performed before control reaches to main function for EL3 execution.
- Program vector table base for exception handling
- Set reset vector table base address
- Program stack pointer for EL3
- Routing of interrupts to EL3
- Enable ECC protection
- Program generic counter frequency
- Invalidate instruction cache, data cache and TLBs
- Configure MMU registers and program base address of translation table
- Transfer control to _start which clears BSS sections and runs global constructor before jumping to main application
If the current exception level is EL1 and BSP is also built for EL1_NONSECURE it will perform initialization required for application execution at EL1 non-secure. For all other combination, the execution will go into infinite loop. Below is a sequence illustrating what all configuration is performed before control reaches to main function for EL1 execution.
- Program vector table base for exception handling
- Program stack pointer for EL1
- Invalidate instruction cache, data cache and TLBs
- Configure MMU registers and program base address of translation table
- Transfer control to _start which clears BSS sections and runs global constructor before jumping to main application