AN-709
2016.01.27
For the scenarios where the next boot stage is located in Flash, the Boot ROM can use up to four different
images:
• On Cold reset, the Boot ROM always starts with the first image, and checks the CRC. If the CRC is OK,
then it passes control to it. If the CRC is not OK, then it tries the next image and so on. Before an image
is passed control, the Boot ROM updates the register
image index.
• On a Warm reset, the Boot ROM looks at the register
value
0x49535756
If the magic value is not found, it means the previous Preloader was not OK, and the Boot ROM will
advance to the next image and increment
• If all images are exhausted, the Boot ROM will try to fallback on the FPGA image. It will continue to be
reset by the Watchdog, but will never try to boot from Flash until the next Cold reset.
Note: The BootROM requires a special header to be placed at the beginning of the images that need to be
loaded from flash. The header also contains a checksum that is used for validating the image. The
header can be attached to the image by using the mkpimage tool that is included with the SoC
EDS.
Preloader
Typically, the main responsibilities of the Preloader are:
• Perform additional HPS initialization
• Bring up SDRAM
• Load the next boot stage from Flash to SDRAM and jump to it
Currently, two different Preloader options are available:
• SPL – part of U-Boot. Provided with SoC EDS under GPL (Open Source) License
• MPL – provided with SoC EDS as an example using the HWLibs (Altera bare-metal libraries). Uses
BSD license.
Note: The Preloader requires a special header to be placed at the beginning of the next stage boot image.
Also, the header contains a CRC value used to validate the image. The header can be attached to an
image by using the mkimage utility that is included with the SoC EDS.
Bootloader
The Bootloader has typical responsibilities that are similar with the Preloader, except it does not need to
bring up SDRAM.
Because the Bootloader is already residing in SDRAM, it is not limited by the size of the OCRAM.
Therefore, it can provide a lot of features, such as network stack support.
Boot Sources
The HPS can boot from one of the following sources, as selected by the BSEL pins:
• SD/MMC
• QSPI
• NAND
• FPGA
HPS SoC Boot Guide - Cyclone V SoC Development Kit
Send Feedback
. If it is there, it means last Preloader executed OK, so it loads it again and executes it.
sysmgr.romcodegrp.initswlastld
sysmgr.romcodegrp.initswlastld
sysmgr.romcodegrp.initswstate
3
Preloader
with the
for the magic
.
Altera Corporation
Need help?
Do you have a question about the Cyclone V and is the answer not in the manual?