You can boot the HPS and HPS EMIF I/O first before configuring the FPGA core and periphery. The MSEL[2:0] settings determine the source for booting the HPS. In this mode, any of the I/O allocated to the FPGA remain tri-stated while the HPS is booting. The HPS can subsequently request the SDM to configure the FPGA core and periphery, excluding the HPS EMIF I/O. Software determines the configuration source for the FPGA core and periphery. In HPS First Boot mode, you have the option of configuring the FPGA core during the SSBL stage or after the operating system boots.
Note: Configuring the HPS EMIF I/O for the first time and then loading the HPS FSBL is called "Phase 1 configuration". The subsequent configuration of FPGA core and periphery by HPS is called "Phase 2 configuration". The phase 1 and phase 2 configuration files must be generated from the same Quartus® Prime Pro Edition software version, this includes patches installed if applicable. For more information about project compatibility between phase 1 and phase 2 designs, refer to the Hardware Project Compatibility in HPS Boot First Mode section.
A typical HPS First Boot flow may look like the following figure. You can use U-Boot, or a custom bootloader for your FSBL or SSBL. An example of an OS is Linux* or Zephyr* or an RTOS. The flow includes the time from power-on-reset (TPOR) to boot completion (TBoot_Complete).
Table 6. HPS Boot First Stages
Time |
Boot Stage |
Device State |
TPOR |
POR |
Power-on reset |
T1 to T2 |
SDM- Boot ROM |
- SDM samples the MSEL pins to determine the configuration and boot source. It also establishes the device security level based on eFuse values.
- SDM firmware initializes the device.
- SDM authenticates and decrypts the bitstream (this process occurs as necessary throughout the configuration).
|
T2 to T3 |
SDM- Configuration Firmware |
- SDM configures the HPS EMIF I/O and the rest of the user-configured SDM I/O.
- SDM loads the FSBL from the bitstream into HPS on-chip RAM.
- HPS boot core start executing FSBL code.
- SDM enables HPS SDRAM I/O and optionally enables HPS debug.
- HPS is released from reset.
|
T3 to T4 |
First Stage Bootloader (FSBL) |
- The FSBL initializes the HPS, including the SDRAM.
- FSBL obtains the SSBL from HPS flash or by requesting flash access from the SDM.
- FSBL loads the SSBL into SDRAM.
- HPS peripheral I/O pin multiplexer and buffers are configured. Clocks, resets and bridges are also configured.
- HPS I/O peripherals are available.
- HPS bootstrap completes.
|
T4 to T5 |
Second Stage Bootloader (SSBL) |
After bootstrap completes, any of the following steps may occur:
- The FPGA core configuration loads into SDRAM from one of the following sources:
- SDM flash
- HPS alternate flash
- EMAC interface
- HPS requests that the SDM configures the FPGA core.
Note: This step is applicable for U-Boot ATF Linux* boot only. For ATF Linux* Boot and ATF Zephyr* Boot, the FPGA configuration happens in the next stage.
- FPGA enters user mode.
- OS is loaded into SDRAM.
|
T5 to TBoot_Complete |
Operating System (OS) |
- OS boot occurs and the OS schedules applications for runtime launch.
- (Optional step) The OS initiates FPGA configuration through a secure monitor call (SMC) to the resident SMC handler (typically SSBL), which then initiates the request to the SDM.
|
Note: The location of the source files for configuration, FSBL, SSBL and OS can vary. For more information, refer to the System Layout for HPS Boot First Mode section.